/* Lurcast page CSS: only what sits inside a visual and the kit lacks, one --p-h per card group,
   the app-frame recipe (sections-library.md), and the one piece of motion written for this page
   (the copy button, built to the animate skill). Every token is the kit's (public/assets). */

/* ---------------------------------------------------------------- hero: the frame's terminal */
.hero--split .hero__media .ui-term { box-shadow: var(--u-shadow); }

/* ---------------------------------------------------------------- #whmcs: the app-frame recipe */
.app.ui { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); margin-top: var(--s-7); background: var(--u-bg); border: 1px solid var(--u-border); border-radius: var(--u-r); box-shadow: var(--u-shadow); }
.app > .app__pane { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.app > .app__pane + .app__pane { border-left: 1px solid var(--u-line); }
.app > .app__pane > .ui-panel { width: 100%; border: 0; border-radius: 0; box-shadow: none; }
.app > .app__pane::after { content: ""; position: absolute; inset: auto 0 0 0; height: 64px; background: linear-gradient(transparent, var(--u-bg)); pointer-events: none; }
@media (min-width: 1024px) and (max-width: 1279px) { .app.ui { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
@media (max-width: 1023px) {
  .app.ui { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .app > .app__pane--list { max-height: 252px; }
  .app > .app__pane--list::after { display: none; }
  .app .ui-win__side { display: none; }
  .app .ui-win__body { grid-template-columns: minmax(0, 1fr); }
  .app > .app__pane + .app__pane { border-left: 0; border-top: 1px solid var(--u-line); }
}
@media (max-width: 639px) {
  .app.ui { grid-template-rows: minmax(0, 1fr); }
  .app > .app__pane--list { display: none; }
  .app > .app__pane + .app__pane { border-top: 0; }
}
/* the app's own palette: the kit's fragment surface, one step above the page */
.app.ui {
  --ui-font: var(--font-text); --ui-mono: var(--font-mono); --ui-radius: 12px;
  --fx-bg: oklch(from var(--p-surface) calc(l + 0.03) c h); --fx-surface: var(--p-surface);
  --fx-ink: var(--p-ink); --fx-muted: var(--p-muted); --fx-accent: var(--p-accent); --fx-accent-ink: var(--p-accent-ink);
}

/* the open pane: the client area page the Lurcast WHMCS module renders (clientarea.tpl) */
.ca { display: flex; flex-direction: column; height: 100%; }
.ca__bar { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 20px; border-bottom: 1px solid var(--u-line); }
.ca__title { color: var(--u-muted); white-space: nowrap; }
.ca__title i { font-style: normal; margin: 0 4px; color: var(--u-soft); }
.ca__title b { color: var(--u-ink); font-weight: 500; }
.ca__chip { color: var(--u-accent-text); background: var(--u-tint); }
.ca__body { padding: 20px 24px; display: grid; gap: 12px; align-content: start; }
.ca__h { margin: 8px 0 0; font-size: 14px; font-weight: 500; color: var(--u-ink); }
.ca__table { margin: 0; border: 1px solid var(--u-line); border-radius: var(--u-r2); overflow: hidden; }
.ca__table > div { display: grid; grid-template-columns: minmax(120px, 2fr) minmax(0, 5fr); gap: 16px; padding: 10px 16px; }
.ca__table > div:nth-child(odd) { background: var(--u-fill); }
.ca__table dt { color: var(--u-muted); }
.ca__table dd { margin: 0; color: var(--u-ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--ui-mono); font-size: 12px; }
.ca__link { color: var(--u-accent-text) !important; }
.ca__live { color: var(--u-accent-text); font-weight: 500; }
@media (max-width: 639px) {
  .ca__body { padding: 16px; }
  .ca__table > div { grid-template-columns: minmax(96px, 2fr) minmax(0, 4fr); padding: 8px 12px; gap: 12px; }
}

/* ---------------------------------------------------------------- #performance */
#performance .perf__frame { --ratio: 60%; }
#performance .perf__stats { margin-top: var(--s-8); }
@media (max-width: 639px) {
  #performance .perf__frame { --ratio: 56%; }
  #performance .perf__stats { margin-top: var(--s-6); grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------- #core: one --p-h for the group */
#core .panel { --p-h: 300px; }
#core .dg { position: absolute; inset: 0; }
/* the dealt bg-mist ground sets its own least height (--g-screen); on a tablet it keeps the section two screens */
#core { --g-screen: 200svh; }
@media (max-width: 639px) { #core { --g-screen: 200lvh; } }
@media (min-width: 1024px) and (max-width: 1279px) { #core .panel { --p-h: 260px; } }
@media (max-width: 639px) { #core .panel { --p-h: 200px; } #core .stage { --fade-h: 40px; } }

/* ---------------------------------------------------------------- #hosting: the tour */
#hosting .tabs { margin-top: var(--s-6); }
#hosting .tour__panels { margin-top: var(--s-5); min-height: calc(4 * 1.6em); max-width: 46ch; }
#hosting .tour__panels p { margin: 0; }
#hosting .tour__ic { display: inline-block; vertical-align: -4px; margin-right: 4px; }
#hosting .tour__frame { --ratio: 82%; }
@media (max-width: 1023px) { #hosting .tour__frame { margin-top: var(--s-6); --ratio: 62%; } }
@media (max-width: 639px) { #hosting .tour__frame { --ratio: 52%; } }

/* ---------------------------------------------------------------- #pricing */
#pricing .plans > .card--plan { align-self: stretch; }
#pricing .plans .card--plan > .btn { margin-top: auto; }
#pricing .plans__note { margin-top: var(--s-6); max-width: 76ch; color: var(--ink); }
@media (min-width: 640px) and (max-width: 1023px) { #pricing .plans > .span-3 { grid-column: auto / span 6; } }

/* ---------------------------------------------------------------- footer */
.footer__notice { flex-basis: 100%; max-width: 110ch; margin: 0; }

/* ---------------------------------------------------------------- the copy button (animate skill)
   Gate: occasional (copying the address), purpose: feedback. Tool: CSS transitions on a state the
   script toggles (data-copied), so a second click retargets instead of restarting. Properties:
   opacity and transform only. Curve: --ease-out for the icon swap, ease for colour on hover.
   Durations: 160ms swap and press (button press 100-160ms). Hover only on a fine pointer. */
.copy-email { display: inline-flex; align-items: center; gap: var(--s-1); white-space: nowrap; }
.copy-btn {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; margin: -10px 0;
  padding: 0; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); cursor: pointer;
  transition: transform 160ms var(--ease-out), color 150ms ease, background-color 150ms ease;
}
.copy-btn:active { transform: scale(0.97); }
.copy-btn__icon {
  grid-area: 1 / 1; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.copy-btn__done { opacity: 0; transform: scale(0.9); color: var(--action); }
.copy-btn[data-copied] .copy-btn__copy { opacity: 0; transform: scale(0.9); }
.copy-btn[data-copied] .copy-btn__done { opacity: 1; transform: scale(1); }
@media (hover: hover) and (pointer: fine) {
  .copy-btn:hover { color: var(--ink); background: color-mix(in oklab, var(--ink) 8%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  /* fewer and gentler: the swap stays as a crossfade, nothing scales */
  .copy-btn { transition: color 150ms ease, background-color 150ms ease; }
  .copy-btn:active { transform: none; }
  .copy-btn__icon, .copy-btn__done, .copy-btn[data-copied] .copy-btn__copy { transform: none; transition: opacity 160ms ease; }
}

/* a terminal or code window on the lit (sand) ground keeps the page's own dark surface and ink */
.frame--lit > .stage {
  --fx-bg: oklch(from var(--p-surface) calc(l + 0.03) c h); --fx-surface: var(--p-surface);
  --fx-ink: var(--p-ink); --fx-muted: var(--p-muted); --fx-accent: var(--p-accent); --fx-accent-ink: var(--p-accent-ink);
}

/* the hero's notice line is read, so it takes the ink */
.hero__kicker { color: var(--ink); }

/* #faq: the ways to run it, as real icons under the line */
#faq .faq__runs { display: flex; gap: var(--s-3); margin: var(--s-5) 0 0; padding: 0; list-style: none; }

/* the name set across the close: room for the face's ascenders */
.close__word { line-height: 1; }

/* phones: a terminal, code or client-area line wraps instead of being cut at the right */
@media (max-width: 639px) {
  .ui-term .ui-term__ln { height: auto; min-height: 20px; white-space: pre-wrap; }
  .ui-term .ui-term__ln > * { flex: 0 1 auto; white-space: pre-wrap; overflow-wrap: anywhere; overflow: visible; text-overflow: clip; }
  .ui-code .ui-code__ln { white-space: pre-wrap; overflow-wrap: anywhere; }
  .ca__table dd { white-space: normal; overflow-wrap: anywhere; }
  #core .panel { --p-h: 150px; }
  .close__word { font-size: 56px; }
}

/* a terminal's output line runs the pane's width (the kit's path column stops at 28 characters) */
.ui-term .term-out { flex: 0 1 auto; color: var(--u-text-2); }

/* ---------------------------------------------------------------- sections on short wide screens
   The kit sets every section to exactly its screens from 1280 up, which assumes a 900px-tall window.
   On a shorter one the content ran past the section's foot (the closing word lay over the footer
   links). From 1280 up, as the kit already does from 640 to 1279: at least its screens, growing past
   them rather than overlapping. At 1440x900 nothing changes. */
@media (min-width: 1280px) {
  main > :is(section, .section):not(.hero, .section--hero), footer.closing {
    height: auto; min-height: calc(var(--h, 1) * 100vh); min-height: calc(var(--h, 1) * 100svh);
  }
  :where(main > :is(section, .section):not(.hero, .section--hero), footer.closing) { display: flex; flex-direction: column; }
  main > :is(section, .section):not(.hero, .section--hero) > :is(.wrap, .container), footer.closing > .wrap { flex: 1 0 auto; height: auto; min-height: 0; }
}

/* ---------------------------------------------------------------- footer: the policy links */
.footer__policies { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.footer__policies a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; transition: color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .footer__policies a:hover { color: var(--ink); } }
@media (max-width: 639px) { .footer__policies a { display: inline-flex; align-items: center; min-height: 44px; } }

/* ---------------------------------------------------------------- the policy pages (/terms, /privacy, /refunds) */
.legal { padding-block: calc(var(--padt) + var(--s-6)) 96px; }
.legal__body { max-width: 72ch; }
.legal__body > * + * { margin-top: var(--s-4); }
.legal__body h1 { font: var(--display-weight) clamp(40px, 5vw, 64px)/1.02 var(--font-display); letter-spacing: var(--display-tracking); text-wrap: balance; }
.legal__body .legal__meta { margin-top: var(--s-3); color: var(--muted); font-family: var(--font-mono); font-size: 14px; }
.legal__body .legal__lead { margin-top: var(--s-6); font-size: var(--t-lead, 20px); line-height: 1.45; }
.legal__body h2 { margin-top: var(--s-8); font: 500 24px/1.2 var(--font-display); letter-spacing: -0.01em; }
.legal__body h3 { margin-top: var(--s-6); font: 500 18px/1.3 var(--font-display); }
.legal__body p, .legal__body li { line-height: 1.6; color: color-mix(in srgb, var(--ink) 86%, transparent); }
.legal__body ul { padding-left: 1.2em; list-style: disc; }
.legal__body li + li { margin-top: var(--s-2); }
.legal__body a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.legal__body strong { color: var(--ink); font-weight: 500; }
.legal__body table { width: 100%; border-collapse: collapse; font-size: 15px; }
.legal__body th, .legal__body td { text-align: left; vertical-align: top; padding: var(--s-3) var(--s-4) var(--s-3) 0; border-bottom: 1px solid var(--line); }
.legal__body th { color: var(--muted); font-weight: 500; }
.legal__table { overflow-x: auto; }

/* ---------------------------------------------------------------- the docs (/docs, /docs/<slug>)
   A sidebar (every page, grouped by section; the current page's h2s under it) beside one readable
   column. Below 1024px the sidebar becomes a plain list above the content. Page HTML comes from
   src/content/docs/*.md, so the body rules style bare elements. */
.docs { padding-block: calc(var(--padt) + var(--s-6)) 96px; }
.docs__layout { display: grid; grid-template-columns: minmax(200px, 248px) minmax(0, 1fr); gap: var(--s-8); align-items: start; }
.docs__side { position: sticky; top: calc(var(--padt) + var(--s-4)); max-height: calc(100vh - var(--padt) - var(--s-6)); overflow-y: auto; padding-right: var(--s-2); }
.docs__nav { display: flex; flex-direction: column; gap: var(--s-5); font-size: 15px; }
.docs__nav a { display: block; padding: 6px 0 6px var(--s-3); border-left: 1px solid var(--line); color: var(--muted); line-height: 1.35; transition: color 150ms ease, border-color 150ms ease; }
.docs__nav a.is-current { color: var(--ink); border-left-color: var(--accent); }
@media (hover: hover) and (pointer: fine) { .docs__nav a:hover { color: var(--ink); } }
.docs__nav .docs__home { border-left: 0; padding-left: 0; font-weight: 500; }
.docs__group-title { margin-bottom: var(--s-2); color: var(--muted); font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.docs__toc { margin: 2px 0 var(--s-2); }
.docs__toc a { padding-left: var(--s-5); font-size: 14px; }

.docs__body { min-width: 0; max-width: 76ch; }
.docs__body > * + *, .docs__content > * + * { margin-top: var(--s-4); }
.docs__body h1 { font: var(--display-weight) clamp(36px, 4.4vw, 56px)/1.04 var(--font-display); letter-spacing: var(--display-tracking); text-wrap: balance; }
.docs__kicker { color: var(--accent); font-family: var(--font-mono); font-size: 13px; letter-spacing: .04em; }
.docs__kicker + h1 { margin-top: var(--s-3); }
.docs__lead { margin-top: var(--s-5); font-size: var(--t-lead, 20px); line-height: 1.45; color: var(--muted); }
.docs__content { margin-top: var(--s-7); }
.docs__body img { display: block; max-width: 100%; height: auto; border: 1px solid color-mix(in oklab, var(--p-ink) 12%, transparent); border-radius: 12px; }
.docs__body h2 { margin-top: var(--s-8); font: 500 26px/1.2 var(--font-display); letter-spacing: -0.01em; }
.docs__body h3 { margin-top: var(--s-6); font: 500 19px/1.3 var(--font-display); }
.docs__body h4 { margin-top: var(--s-5); font: 500 16px/1.3 var(--font-display); }
.docs__body :is(h2, h3, h4) { scroll-margin-top: calc(var(--padt) + var(--s-4)); }
.docs__anchor { margin-left: .4em; color: var(--muted); text-decoration: none; opacity: 0; transition: opacity 150ms ease; }
.docs__body :is(h2, h3, h4):hover .docs__anchor, .docs__anchor:focus-visible { opacity: 1; }
.docs__content p, .docs__content li { line-height: 1.65; color: color-mix(in srgb, var(--ink) 86%, transparent); }
.docs__content ul { padding-left: 1.2em; list-style: disc; }
.docs__content ol { padding-left: 1.4em; list-style: decimal; }
.docs__content li + li { margin-top: var(--s-2); }
.docs__content a:not(.docs__anchor) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .docs__content a:not(.docs__anchor):hover { text-decoration-color: var(--accent); } }
.docs__content strong { color: var(--ink); font-weight: 500; }
.docs__content :not(pre) > code { font-family: var(--font-mono); font-size: .88em; padding: .1em .35em; border-radius: 4px; background: var(--surface); color: var(--ink); overflow-wrap: anywhere; }
.docs__content pre { overflow-x: auto; padding: var(--s-4) var(--s-5); border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font: 14px/1.6 var(--font-mono); color: var(--ink); tab-size: 2; }
.docs__content pre code { font: inherit; white-space: pre; }
.docs__content :is(pre, .docs__scroll):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.docs__scroll { overflow-x: auto; }
.docs__content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.docs__content th, .docs__content td { text-align: left; vertical-align: top; padding: var(--s-3) var(--s-4) var(--s-3) 0; border-bottom: 1px solid var(--line); line-height: 1.5; }
.docs__content th { color: var(--muted); font-weight: 500; white-space: nowrap; }
.docs__content td code { white-space: nowrap; overflow-wrap: normal; }

.docs__index { margin-top: var(--s-8); }
.docs__index h2 { margin-top: 0; }
.docs__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--s-4); margin-top: var(--s-5); }
.docs__cards a { display: flex; flex-direction: column; gap: var(--s-2); height: 100%; padding: var(--s-5); border: 1px solid var(--line); border-radius: 6px; background: var(--surface); transition: border-color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .docs__cards a:hover { border-color: var(--accent); } }
.docs__card-title { font: 500 18px/1.3 var(--font-display); color: var(--ink); }
.docs__card-text { font-size: 15px; line-height: 1.5; color: var(--muted); }

.docs__pager { display: flex; justify-content: space-between; gap: var(--s-4); margin-top: var(--s-9); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.docs__pager a { display: flex; flex-direction: column; gap: var(--s-1); color: var(--ink); font-weight: 500; }
.docs__pager a span { color: var(--muted); font: 12px/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.docs__pager .docs__pager-next { margin-left: auto; text-align: right; }

@media (max-width: 1023px) {
  .docs__layout { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .docs__side { position: static; max-height: none; overflow: visible; padding: 0 0 var(--s-5); border-bottom: 1px solid var(--line); }
  .docs__nav { flex-direction: row; flex-wrap: wrap; gap: var(--s-4) var(--s-8); }
  .docs__nav .docs__home { flex-basis: 100%; }
  .docs__toc { display: none; }
}
@media (max-width: 639px) {
  .docs__nav { flex-direction: column; gap: var(--s-4); }
  .docs__nav a { min-height: 44px; display: flex; align-items: center; padding-block: 4px; }
  .docs__content pre { padding: var(--s-3) var(--s-4); font-size: 13px; }
  .docs__content table { font-size: 14px; }
  .docs__pager { flex-direction: column; }
  .docs__pager .docs__pager-next { margin-left: 0; text-align: left; }
}

/* ---------------------------------------------------------------- #ops: day-to-day features */
#ops .ops__card { gap: var(--s-2); }
#ops .ops__mono {
  align-self: flex-start; max-width: 100%; margin-bottom: var(--s-3); padding: 3px 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 400 13px/1.5 var(--font-mono); color: var(--accent);
  background: color-mix(in oklab, var(--accent) 10%, transparent); border-radius: 6px;
}
#ops .ops__more { margin-top: auto; padding-top: var(--s-4); color: var(--muted); font-size: 15px; text-underline-offset: 3px; }
#ops .ops__more:hover { color: var(--ink); }
