/* Liquid Dashboard showcase (liquid-dashboard.html).
   Page chrome (.rl-lq-*) follows the site theme through the --rl-* tokens.
   The app frame (.lq-*) emulates ReadyView and is dark in both themes. */

.rl-lq { color: var(--rl-text); background: var(--rl-bg); }
.rl-lq-wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.rl-lq-wrap--wide { max-width: 1480px; }

.rl-lq-hero { padding: 72px 0 36px; text-align: center; }
.rl-lq-eyebrow {
    display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--rl-accent-bright); margin-bottom: 14px;
}
.rl-lq-title {
    font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 700; line-height: 1.05;
    letter-spacing: -.02em; color: var(--rl-heading); margin: 0 0 18px; text-wrap: balance;
}
.rl-lq-lead {
    max-width: 640px; margin: 0 auto 26px; font-size: 1.13rem; line-height: 1.6;
    color: var(--rl-text-muted); text-wrap: pretty;
}
.rl-lq-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.rl-lq-demo { padding: 12px 0 56px; scroll-margin-top: 80px; }
.rl-lq-note {
    display: flex; gap: 14px; align-items: baseline; justify-content: center; flex-wrap: wrap;
    margin: 16px 0 0; font-size: .9rem; color: var(--rl-text-muted); text-align: center;
}
.rl-lq-reset {
    border: 0; background: none; padding: 0; font: inherit; font-weight: 500;
    color: var(--rl-link); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.rl-lq-reset:hover { color: var(--rl-link-hover); }

.rl-lq-feats { padding: 56px 0 80px; background: var(--rl-bg-alt); }
.rl-lq-h2 {
    font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 700; color: var(--rl-heading);
    text-align: center; margin: 0 0 32px; text-wrap: balance;
}
.rl-lq-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.rl-lq-card {
    background: var(--rl-surface); border: 1px solid var(--rl-line); border-radius: 14px; padding: 24px;
}
.rl-lq-card > i { font-size: 1.25rem; color: var(--rl-accent-bright); margin-bottom: 14px; }
.rl-lq-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--rl-heading); margin: 0 0 8px; }
.rl-lq-card p { margin: 0; line-height: 1.6; color: var(--rl-text-muted); }

/* ------------------------------------------------------------------ app frame */
.lq-app {
    --lq-bg: #06080b; --lq-card: #0d1014; --lq-card-2: #13171c;
    --lq-line: rgba(255, 255, 255, .08); --lq-line-2: rgba(255, 255, 255, .14);
    --lq-text: #e9edf2; --lq-muted: #8d95a0; --lq-faint: #5d6570;
    --lq-blue: #4184f3; --lq-purple: #a66bf5; --lq-amber: #f0a52b; --lq-green: #56d67f;
    --lq-red: #f0736a; --lq-accent: #4DA8DA;
    --lq-sans: var(--rl-font-sans, 'DM Sans', sans-serif);
    --lq-mono: 'DM Mono', 'SF Mono', Menlo, Consolas, monospace;
    background: var(--lq-bg); color: var(--lq-text); border: 1px solid var(--lq-line-2);
    border-radius: 16px; box-shadow: 0 30px 80px rgba(3, 12, 24, .35);
    font-size: 13px; line-height: 1.35; text-align: left;
}
.lq-app *, .lq-app *::before, .lq-app *::after { box-sizing: border-box; }
.lq-top {
    display: flex; align-items: center; gap: 12px; height: 50px; padding: 0 14px;
    border-bottom: 1px solid var(--lq-line);
}
.lq-site, .lq-search {
    display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px;
    border: 1px solid var(--lq-line); border-radius: 8px; background: var(--lq-card); white-space: nowrap;
}
.lq-site { font-weight: 500; }
.lq-site i { font-size: 11px; color: var(--lq-muted); }
.lq-search { margin-left: auto; width: min(340px, 40%); color: var(--lq-muted); }
.lq-search kbd {
    margin-left: auto; padding: 1px 6px; border: 1px solid var(--lq-line-2); border-radius: 4px;
    background: none; color: var(--lq-muted); font: 11px var(--lq-mono);
}
.lq-avatar {
    display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
    background: var(--lq-text); color: var(--lq-bg); font-size: 10px; font-weight: 700;
}
.lq-main { display: flex; }
.lq-rail {
    flex: 0 0 46px; display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 14px 0; border-right: 1px solid var(--lq-line); color: var(--lq-muted);
}
.lq-rail i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; font-size: 14px; }
.lq-rail i.is-on { background: rgba(77, 168, 218, .16); color: var(--lq-accent); }
.lq-canvas { flex: 1; min-width: 0; padding: 14px; }

/* ------------------------------------------------------------------ grid */
.lq-grid { position: relative; transition: height .22s ease; }
.lq-grid.is-arranging {
    background-image:
        repeating-linear-gradient(to right, var(--lq-line) 0 1px, transparent 1px var(--lq-colstep)),
        repeating-linear-gradient(to bottom, var(--lq-line) 0 1px, transparent 1px var(--lq-rowstep));
    background-position: calc(var(--lq-gap) / -2) calc(var(--lq-gap) / -2);
}
.lq-ghost {
    position: absolute; top: 0; left: 0; border: 1px dashed var(--lq-accent); border-radius: 12px;
    background: rgba(77, 168, 218, .08); transition: transform .16s ease, width .16s ease, height .16s ease;
}
.lq-w {
    position: absolute; top: 0; left: 0; display: flex; flex-direction: column;
    background: var(--lq-card); border: 1px solid var(--lq-line); border-radius: 12px;
    transition: transform .22s ease, width .22s ease, height .22s ease, border-color .15s, box-shadow .15s;
}
.lq-w.is-live { transition: border-color .15s, box-shadow .15s; z-index: 5; border-color: var(--lq-accent); box-shadow: 0 18px 40px rgba(0, 0, 0, .55); }
.lq-w.is-flash { border-color: var(--lq-accent); box-shadow: 0 0 0 3px rgba(77, 168, 218, .25); }
.lq-w.is-new { animation: lq-pop .35s ease; }
@keyframes lq-pop { from { opacity: 0; scale: .96; } }
.lq-w__head { padding: 12px 64px 4px 14px; min-height: 44px; border-radius: 12px 12px 0 0; outline: none; }
.lq-grid.can-arrange .lq-w__head { cursor: grab; touch-action: none; user-select: none; }
.lq-grid.can-arrange .lq-w.is-live .lq-w__head { cursor: grabbing; }
.lq-w__head:focus-visible { box-shadow: inset 0 0 0 2px var(--lq-accent); }
.lq-w__head h3 { margin: 0; font-size: 14px; font-weight: 700; color: var(--lq-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lq-w__head p { margin: 2px 0 0; font-size: 11.5px; color: var(--lq-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lq-w__tools { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.lq-w:hover .lq-w__tools, .lq-w:focus-within .lq-w__tools, .lq-w.is-live .lq-w__tools { opacity: 1; }
@media (hover: none) { .lq-w__tools { opacity: 1; } }
.lq-w__tools button {
    display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1px solid var(--lq-line-2);
    border-radius: 6px; background: var(--lq-card-2); color: var(--lq-muted); font-size: 10px; cursor: pointer;
}
.lq-w__tools button:hover, .lq-w__tools button:focus-visible { color: var(--lq-text); border-color: var(--lq-accent); outline: none; }
.lq-w.is-collapsed .lq-w__tools [data-act="collapse"] i { transform: rotate(180deg); }
.lq-w__body { flex: 1; min-height: 0; padding: 6px 14px 14px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.lq-w.is-collapsed .lq-w__body, .lq-w.is-collapsed .lq-w__resize { display: none; }
.lq-w__resize {
    position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; cursor: nwse-resize;
    touch-action: none; opacity: 0; transition: opacity .15s; display: none;
}
.lq-grid.can-arrange .lq-w__resize { display: block; }
.lq-w__resize::after {
    content: ''; position: absolute; right: 5px; bottom: 5px; width: 9px; height: 9px;
    border-right: 2px solid var(--lq-accent); border-bottom: 2px solid var(--lq-accent); border-radius: 0 0 3px 0;
}
.lq-w:hover .lq-w__resize, .lq-w.is-live .lq-w__resize { opacity: 1; }
.lq-writing { flex: 1; display: grid; place-items: center; color: var(--lq-muted); }
.lq-spin { width: 18px; height: 18px; border: 2px solid var(--lq-line-2); border-top-color: var(--lq-accent); border-radius: 50%; animation: lq-spin .8s linear infinite; }
@keyframes lq-spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ widget parts */
.lq-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lq-green); margin-right: 5px; }
.lq-dot--amber { background: var(--lq-amber); }
.lq-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lq-tile { padding: 8px 4px; border: 1px solid var(--lq-line); border-radius: 8px; background: var(--lq-bg); text-align: center; min-width: 0; }
.lq-tile b { display: block; font-size: 16px; color: var(--lq-text); }
.lq-tile b.is-blue { color: var(--lq-blue); }
.lq-tile span { display: block; font-size: 10.5px; color: var(--lq-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lq-kv { display: flex; flex-direction: column; gap: 9px; margin: 0; }
.lq-kv div { display: flex; justify-content: space-between; gap: 10px; }
.lq-kv dt { font-weight: 400; color: var(--lq-muted); white-space: nowrap; }
.lq-kv dd { margin: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lq-mono { font-family: var(--lq-mono); font-size: 12px; }
.lq-stats { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.lq-stat span { display: block; font-size: 11px; color: var(--lq-muted); }
.lq-stat b { font-size: 17px; font-weight: 700; }
.lq-stat i { display: inline-block; width: 9px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.lq-pills { position: absolute; top: 10px; right: 70px; display: flex; border: 1px solid var(--lq-line); border-radius: 7px; overflow: hidden; }
.lq-pills button { border: 0; background: none; color: var(--lq-muted); font: 700 10.5px/1 var(--lq-sans); padding: 6px 8px; cursor: pointer; }
.lq-pills button[aria-pressed="true"] { background: var(--lq-blue); color: #fff; }
.lq-pills button:focus-visible { outline: 2px solid var(--lq-accent); outline-offset: -2px; }

.lq-chart { flex: 1; min-height: 60px; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: 1fr auto; column-gap: 8px; row-gap: 4px; }
.lq-chart__y { display: flex; flex-direction: column; justify-content: space-between; text-align: right; font-size: 10.5px; color: var(--lq-muted); white-space: nowrap; margin: -6px 0; }
.lq-chart__y--r { text-align: left; grid-column: 3; }
.lq-chart__plot { position: relative; min-height: 0; grid-column: 2; grid-row: 1; border-bottom: 1px solid var(--lq-line-2); }
.lq-chart__plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lq-chart__x { grid-column: 2; grid-row: 2; display: flex; justify-content: space-between; font-size: 10.5px; color: var(--lq-muted); white-space: nowrap; }

.lq-strip { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--lq-muted); }
.lq-strip__label { flex: 0 0 62px; }
.lq-strip__bar { flex: 1; display: flex; gap: 2px; height: 8px; min-width: 0; }
.lq-strip__bar i { flex: 1; border-radius: 1.5px; background: var(--lq-green); }
.lq-strip__bar i.is-warn { background: var(--lq-amber); }
.lq-strip b { color: var(--lq-green); font-weight: 700; }
.lq-badge { display: inline-block; padding: 2px 7px; border-radius: 5px; background: var(--lq-green); color: #062511; font-size: 11px; font-weight: 700; }
.lq-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lq-muted { color: var(--lq-muted); font-size: 11.5px; }

.lq-split { flex: 1; min-height: 0; display: flex; align-items: center; gap: 16px; }
.lq-donut { position: relative; flex: 0 0 auto; height: 100%; max-height: 120px; aspect-ratio: 1; }
.lq-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.lq-donut div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-size: 10px; color: var(--lq-muted); }
.lq-donut b { font-size: 13px; color: var(--lq-text); }
.lq-table { flex: 1; min-width: 0; border-collapse: collapse; font-size: 12px; }
.lq-table th { font-weight: 400; color: var(--lq-muted); text-align: right; padding: 0 0 5px 8px; }
.lq-table td { text-align: right; padding: 5px 0 5px 8px; border-top: 1px solid var(--lq-line); white-space: nowrap; }
.lq-table th:first-child, .lq-table td:first-child { text-align: left; padding-left: 0; overflow: hidden; text-overflow: ellipsis; max-width: 0; width: 60%; }
.lq-table td i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 6px; }
.lq-table .is-blue { color: var(--lq-blue); }
.lq-table .is-purple { color: var(--lq-purple); }

.lq-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.lq-list li { display: grid; grid-template-columns: minmax(0, 96px) 1fr auto; align-items: center; gap: 10px; }
.lq-list li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lq-list li i { height: 6px; border-radius: 3px; background: var(--lq-card-2); overflow: hidden; }
.lq-list li i::after { content: ''; display: block; height: 100%; width: var(--v); border-radius: 3px; background: var(--lq-blue); }
.lq-list li b { font-weight: 500; color: var(--lq-muted); font-size: 12px; }

.lq-band { display: flex; flex-direction: column; gap: 5px; }
.lq-band__scale { position: relative; height: 18px; border-radius: 5px; background: linear-gradient(to right, #5a2a2a, #6b4a22 33%, #23475e 66%, #235a3a); }
.lq-band__scale span { position: absolute; top: 0; bottom: 0; display: grid; place-items: center; width: 25%; font-size: 10px; font-weight: 700; color: rgba(255, 255, 255, .78); }
.lq-band__aps { position: relative; height: 26px; }
.lq-band__aps span {
    position: absolute; top: 2px; transform: translateX(-50%); padding: 2px 7px; border: 1px solid var(--lq-line-2);
    border-radius: 6px; background: var(--lq-card-2); font-size: 10.5px; white-space: nowrap;
}
.lq-chip { display: inline-block; padding: 1px 7px; border: 1px solid rgba(86, 214, 127, .4); border-radius: 999px; color: var(--lq-green); font-size: 10.5px; font-weight: 700; margin-left: 6px; }

/* ------------------------------------------------------------------ prompt dock */
.lq-dock {
    position: sticky; bottom: 14px; z-index: 20; width: min(660px, 100%); margin: 18px auto 0;
    display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.lq-dock > * { pointer-events: auto; }
.lq-bar {
    display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 8px 0 16px; margin: 0;
    border: 1px solid var(--lq-line-2); border-radius: 999px; background: rgba(15, 19, 24, .94);
    backdrop-filter: blur(10px); box-shadow: 0 12px 34px rgba(0, 0, 0, .6);
    transition: border-color .15s, box-shadow .15s;
}
.lq-bar:focus-within, .lq-bar.is-busy { border-color: var(--lq-accent); box-shadow: 0 12px 34px rgba(0, 0, 0, .6), 0 0 0 3px rgba(77, 168, 218, .18); }
.lq-bar__spark { color: var(--lq-accent); }
.lq-bar input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--lq-text); font: 500 14px/1.2 var(--lq-sans); }
.lq-bar input::placeholder { color: var(--lq-muted); opacity: 1; }
.lq-bar__send {
    flex: 0 0 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%;
    background: var(--lq-accent); color: #04131c; font-size: 12px; cursor: pointer; transition: background .15s, opacity .15s;
}
.lq-bar__send:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lq-bar.is-empty .lq-bar__send { opacity: .45; }
.lq-bar.is-busy .lq-bar__send { background: var(--lq-red); opacity: 1; }
.lq-toast {
    align-self: flex-start; max-width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px;
    border: 1px solid var(--lq-line-2); border-radius: 12px; background: rgba(15, 19, 24, .96);
    box-shadow: 0 12px 34px rgba(0, 0, 0, .6); font-size: 13px;
}
.lq-toast[hidden] { display: none; }
.lq-toast button {
    flex: 0 0 auto; border: 0; border-radius: 999px; padding: 4px 11px; background: rgba(77, 168, 218, .16);
    color: var(--lq-accent); font: 700 12px/1.3 var(--lq-sans); cursor: pointer;
}
.lq-toast button[data-x] { background: none; color: var(--lq-muted); padding: 4px 6px; }
.lq-toast button:focus-visible { outline: 2px solid var(--lq-accent); outline-offset: 1px; }
.lq-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.lq-chips button {
    border: 1px solid var(--lq-line-2); border-radius: 999px; padding: 4px 11px; background: rgba(15, 19, 24, .94);
    color: var(--lq-muted); font: 500 12px/1.3 var(--lq-sans); cursor: pointer; transition: color .15s, border-color .15s;
}
.lq-chips button:hover, .lq-chips button:focus-visible { color: var(--lq-text); border-color: var(--lq-accent); outline: none; }

@media (max-width: 700px) {
    .rl-lq-hero { padding-top: 48px; }
    .rl-lq-wrap--wide { padding: 0 10px; }
    .lq-rail, .lq-search { display: none; }
    .lq-avatar { margin-left: auto; }
    .lq-canvas { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .lq-grid, .lq-w, .lq-ghost { transition: none; }
    .lq-w.is-new { animation: none; }
}

/* Widgets adapt to their own width, not the viewport: they are resized by hand. */
.lq-app { font-family: var(--lq-sans); }
.lq-w { container-type: inline-size; }
@container (max-width: 430px) {
    .lq-pills { display: none; }
    .lq-stats { gap: 6px 16px; }
    .lq-stat b { font-size: 14px; }
}
@container (max-width: 300px) {
    .lq-donut { display: none; }
    .lq-chart__y--r { display: none; }
}
