/* FlatQL public site: shared behaviour styles on top of the design export's inline styles.
   The pages carry their own layout inline; this file adds what the export cannot express:
   state (hidden, open menu, alerts, busy buttons), the mobile collapse and the animations. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; color-scheme: light; }
html, body { overflow-x: hidden; }
body > div > header { position: relative; z-index: 20; }

/* mobile navigation (the .menu-btn toggles .nav-links.open) */
@media (max-width: 900px) {
  .nav-links.open { display: flex !important; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column !important; align-items: stretch !important; gap: 0 !important; background: #ffffff; border-bottom: 1px solid #e3e6ee; padding: 8px 16px 12px; box-shadow: 0 16px 40px rgba(21, 23, 31, 0.12); }
  .nav-links.open a { padding: 12px 4px; border-bottom: 1px solid #eef0f5; font-size: 15px !important; text-align: left; }
  .nav-links.open a:last-child { border-bottom: 0; }
}

/* forms: alerts injected by site.js, busy buttons */
.alert { display: none; padding: 10px 12px; border-radius: 4px; font-size: 13.5px; line-height: 1.45; margin: 0 0 14px; }
.alert.error { display: block; background: #fdecec; color: #a12626; border: 1px solid #f3b4b4; }
.alert.ok { display: block; background: #e3f6ea; color: #0a6b2f; border: 1px solid #b7e6c8; }
.alert.info { display: block; background: #e4e9f6; color: #1f3a8a; border: 1px solid #b9c4e6; }
button[disabled] { opacity: 0.65; cursor: wait !important; }
/* Sign in with Google (login, register); shown by site.js when the server has it configured */
.sso { display: flex; flex-direction: column; gap: 18px; }
.sso[hidden] { display: none; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 4px; border: 1px solid #c9cedb; background: #fff; color: #15171f; font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.btn-google:hover { background: #f6f7fb; border-color: #aab3c5; }
.btn-google:focus-visible { outline: 2px solid #1f3a8a; outline-offset: 2px; }
.or { display: flex; align-items: center; gap: 12px; color: #5f6578; font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: #e3e6ee; }
/* Cloudflare Turnstile slot (login, register, contact); shown by site.js when a site key is configured */
.turnstile { min-height: 65px; display: flex; justify-content: center; }
.turnstile[hidden] { display: none; }
.honeypot { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
[data-when-signed-in][hidden] { display: none !important; }

/* small screens: multi-column grids stack, the auth brand panel goes, wide tables scroll */
@media (max-width: 760px) {
  [style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  .auth > aside { display: none !important; }
  .auth > main { padding: 24px 16px !important; }
  .compare-wrap { overflow-x: auto; }
}
@media (max-width: 900px) {
  [data-hero-editor] + div { overflow-x: auto; }
}

/* animations (landing.js adds the classes; nothing is hidden until JS runs) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s cubic-bezier(.16, 1, .3, 1), transform .6s cubic-bezier(.16, 1, .3, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .06s; } .reveal.d2 { transition-delay: .12s; } .reveal.d3 { transition-delay: .18s; } .reveal.d4 { transition-delay: .24s; } .reveal.d5 { transition-delay: .3s; }
.hero-rise > * { animation: rise .7s cubic-bezier(.16, 1, .3, 1) both; }
.hero-rise > :nth-child(2) { animation-delay: .08s; } .hero-rise > :nth-child(3) { animation-delay: .16s; } .hero-rise > :nth-child(4) { animation-delay: .24s; } .hero-rise > :nth-child(5) { animation-delay: .32s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.hero-window-in { animation: rise .9s .25s cubic-bezier(.16, 1, .3, 1) both; }
.typing [data-typed-lines] > div { opacity: 0; }
.typing [data-typed-lines] > div.on { opacity: 1; }
.typing [data-typed-lines] > div.on.cursor::after { content: ""; display: inline-block; width: 7px; height: 1em; margin-left: 2px; vertical-align: -2px; background: #8fb6ff; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.typing [data-hero-row] { opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s; }
.typing.rows-in [data-hero-row] { opacity: 1; transform: none; }
.typing.rows-in [data-hero-row]:nth-of-type(3) { transition-delay: .12s; } .typing.rows-in [data-hero-row]:nth-of-type(4) { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .hero-rise > *, .hero-window-in, .typing [data-typed-lines] > div, .typing [data-hero-row] { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
}

/* hero: one workbench window, two frames (browser / desktop app); landing.js flips data-device */
.hero-switch { display: inline-flex; gap: 2px; padding: 3px; margin: 0 0 14px; border: 1px solid #e3e6ee; border-radius: 999px; background: #f6f7fa; }
.hero-switch button { height: 30px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: #4b5063; font: 600 13px/1 Inter, system-ui, sans-serif; cursor: pointer; transition: background .25s, color .25s, box-shadow .25s; }
.hero-switch button[aria-pressed="true"] { background: #ffffff; color: #1f3a8a; box-shadow: 0 1px 3px rgba(21, 23, 31, .14); }
.hero-switch button:focus-visible, .dk-os button:focus-visible { outline: 2px solid #1f3a8a; outline-offset: 2px; }
.hero-frame { transition: border-radius .45s ease, box-shadow .45s ease; }
.hero-device[data-device="desktop"] .hero-frame { border-radius: 12px !important; box-shadow: 0 48px 100px -40px rgba(21, 23, 31, .55) !important; }
.hero-chrome { position: relative; height: 40px; background: #16191d; border-bottom: 1px solid #262a2f; font-family: Inter, system-ui, sans-serif; }
.hero-chrome > span { position: absolute; inset: 0; display: flex; align-items: center; gap: 12px; padding: 0 14px; transition: opacity .45s ease, transform .45s ease; }
.hc-desk { opacity: 0; transform: translateY(-4px); }
.hero-device[data-device="desktop"] .hc-web { opacity: 0; transform: translateY(4px); }
.hero-device[data-device="desktop"] .hc-desk { opacity: 1; transform: none; }
.hc-dots i, .hc-lights i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 7px; background: #3a3f46; }
.hc-lights i:nth-child(1) { background: #ff5f57; } .hc-lights i:nth-child(2) { background: #febc2e; } .hc-lights i:nth-child(3) { background: #28c840; }
.hc-url { flex: 1; max-width: 460px; margin: 0 auto; height: 26px; border-radius: 6px; background: #0f1114; border: 1px solid #262a2f; color: #9ea4ad; display: flex; align-items: center; justify-content: center; gap: 6px; font: 12px 'IBM Plex Mono', ui-monospace, monospace; }
.hc-title { position: absolute; left: 50%; transform: translateX(-50%); color: #c9ced6; font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.hc-keys { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 10px; border-radius: 999px; background: rgba(27, 175, 122, .14); color: #4fd6a0; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
@media (max-width: 640px) { .hc-title { display: none; } .hc-url { font-size: 10.5px; } }

/* web + desktop section: the desktop app in front, the web app behind, OS chrome cycling */
.dk-stage { display: flex; flex-direction: column; gap: 14px; }
.dk-wall { position: relative; aspect-ratio: 16 / 11; min-height: 360px; border-radius: 14px; overflow: hidden; border: 1px solid #e3e6ee; background: var(--dk-wall); transition: background .9s ease; font-family: Inter, system-ui, sans-serif; }
.dk-stage[data-os="mac"] { --dk-wall: radial-gradient(110% 85% at 15% 0%, #c9d4f7 0%, transparent 60%), radial-gradient(110% 85% at 100% 100%, #e5d6f6 0%, transparent 60%), #eef1f8; }
.dk-stage[data-os="windows"] { --dk-wall: radial-gradient(110% 85% at 50% 110%, #b9d6ff 0%, transparent 62%), radial-gradient(90% 70% at 0% 0%, #e2ecff 0%, transparent 60%), #edf3fd; }
.dk-stage[data-os="linux"] { --dk-wall: radial-gradient(110% 85% at 0% 100%, #f6d3bd 0%, transparent 60%), radial-gradient(110% 85% at 100% 0%, #e6d1ec 0%, transparent 60%), #f7f1f2; }
.dk-browser { position: absolute; right: 4%; top: 7%; width: 54%; background: #ffffff; border: 1px solid #d9dde7; border-radius: 8px; overflow: hidden; box-shadow: 0 18px 40px -20px rgba(21, 23, 31, .35); }
.dk-browser-bar { height: 26px; display: flex; align-items: center; gap: 8px; padding: 0 8px; background: #f1f3f8; border-bottom: 1px solid #e3e6ee; }
.dk-dots i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; background: #cfd4df; }
.dk-url { flex: 1; height: 16px; border-radius: 4px; background: #ffffff; border: 1px solid #e3e6ee; color: #5f6578; display: flex; align-items: center; justify-content: center; gap: 4px; font: 10px 'IBM Plex Mono', ui-monospace, monospace; }
.dk-browser-body { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.dk-mini-h { font-size: 11px; font-weight: 700; color: #15171f; }
.dk-mini-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid #e3e6ee; border-radius: 5px; font-size: 10.5px; }
.dk-mini-row b { font: 600 10.5px 'IBM Plex Mono', ui-monospace, monospace; color: #15171f; }
.dk-mini-row em { font-style: normal; font-size: 9.5px; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.dk-mini-row em.cloud { background: #e8ecf8; color: #1f3a8a; }
.dk-mini-row em.sync { background: #e3f6ea; color: #0a6b2f; }
.dk-synced-row { animation: dk-arrive 4.8s ease-in-out infinite; }
.dk-sync { position: absolute; left: 22%; top: 27%; width: 20%; height: 12%; overflow: visible; }
.dk-sync path { fill: none; stroke: #1f3a8a; stroke-width: 2; stroke-dasharray: 5 6; opacity: .55; vector-effect: non-scaling-stroke; animation: dk-flow 1.1s linear infinite; }
.dk-sync-label { position: absolute; left: 5%; top: 17%; font: 10.5px 'IBM Plex Mono', ui-monospace, monospace; color: #1f3a8a; background: rgba(255, 255, 255, .88); padding: 2px 8px; border-radius: 999px; border: 1px solid #d6ddf3; white-space: nowrap; }
.dk-app { position: absolute; left: 4%; bottom: 6%; width: 62%; background: #1b1e22; color: #e7e9ec; border: 1px solid #2c3036; border-radius: 10px; overflow: hidden; box-shadow: 0 30px 60px -24px rgba(21, 23, 31, .55); transition: border-radius .5s ease; }
.dk-stage[data-os="windows"] .dk-app { border-radius: 6px; }
.dk-swap .dk-app { animation: dk-pop .5s cubic-bezier(.16, 1, .3, 1); }
.dk-titlebar { position: relative; height: 30px; display: flex; align-items: center; padding: 0 10px; background: #16191d; border-bottom: 1px solid #262a2f; }
.dk-lights i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.dk-lights i:nth-child(1) { background: #ff5f57; } .dk-lights i:nth-child(2) { background: #febc2e; } .dk-lights i:nth-child(3) { background: #28c840; }
.dk-title { position: absolute; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: #c9ced6; transition: left .45s ease, transform .45s ease; }
.dk-title svg { color: #8ea6e3; }
.dk-ctrls { position: absolute; top: 0; right: 0; bottom: 0; display: none; align-items: center; }
.dk-ctrls-win i { width: 36px; height: 100%; display: grid; place-items: center; font-style: normal; font-size: 11px; color: #c9ced6; }
.dk-ctrls-linux { gap: 7px; right: 10px; }
.dk-ctrls-linux i { width: 15px; height: 15px; border-radius: 50%; background: #2c3036; display: grid; place-items: center; font-style: normal; font-size: 8px; color: #c9ced6; }
.dk-ctrls-linux i:last-child { background: #e95420; color: #ffffff; }
.dk-stage[data-os="windows"] .dk-lights, .dk-stage[data-os="linux"] .dk-lights { display: none; }
.dk-stage[data-os="windows"] .dk-title { left: 12px; transform: none; }
.dk-stage[data-os="windows"] .dk-ctrls-win, .dk-stage[data-os="linux"] .dk-ctrls-linux { display: flex; }
.dk-app-body { display: flex; min-height: 214px; }
.dk-rail { width: 30px; flex: 0 0 30px; background: #16191d; border-right: 1px solid #262a2f; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 0; }
.dk-rail i { width: 14px; height: 14px; border-radius: 4px; background: #2a2f36; }
.dk-rail i.on { background: #26418f; }
.dk-list { flex: 1; min-width: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; }
.dk-list-h { font-size: 11px; font-weight: 700; color: #e7e9ec; }
.dk-list-h em { font-style: normal; font-weight: 500; color: #9ea4ad; margin-left: 4px; }
.dk-conn { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border: 1px solid #2c3036; border-radius: 7px; background: #202429; }
.dk-av { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; font: 600 9.5px 'IBM Plex Mono', ui-monospace, monospace; color: #8ea6e3; background: rgba(142, 166, 227, .14); }
.dk-av.red { color: #ef8a8a; background: rgba(239, 91, 91, .14); }
.dk-conn-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dk-conn-t b { font: 600 11px 'IBM Plex Mono', ui-monospace, monospace; color: #e7e9ec; }
.dk-conn-t small { font: 9.5px 'IBM Plex Mono', ui-monospace, monospace; color: #9ea4ad; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; font-size: 9.5px; font-weight: 600; white-space: nowrap; }
.dk-badge.here { color: #4fd6a0; background: rgba(27, 175, 122, .14); animation: dk-glow 2.4s ease-in-out infinite; }
.dk-badge.sync { color: #8ea6e3; background: rgba(142, 166, 227, .14); }
.dk-badge.cloud { color: #c9ced6; background: #2a2f36; }
.dk-keystore { margin-top: auto; display: flex; align-items: center; gap: 7px; padding-top: 8px; border-top: 1px solid #262a2f; font-size: 10.5px; color: #9ea4ad; }
.dk-keystore svg { color: #4fd6a0; flex: none; }
.dk-keystore b { color: #e7e9ec; font-weight: 600; }
.dk-keystore .ks { display: none; }
.dk-stage[data-os="mac"] .ks-mac, .dk-stage[data-os="windows"] .ks-windows, .dk-stage[data-os="linux"] .ks-linux { display: inline; }
.dk-os { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.dk-os button { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid #e3e6ee; background: #ffffff; color: #4b5063; font: 600 13px/1 Inter, system-ui, sans-serif; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: border-color .25s, color .25s, box-shadow .25s; }
.dk-os button em { font-style: normal; font-weight: 500; font-size: 11px; color: #5f6578; padding: 2px 7px; border-radius: 999px; background: #f1f3f8; }
.dk-os button[data-os="mac"] em { color: #0a6b2f; background: #e3f6ea; }
.dk-os button[aria-pressed="true"] { border-color: #1f3a8a; color: #1f3a8a; box-shadow: 0 0 0 3px rgba(31, 58, 138, .1); }
.dk-dl { transition: transform .2s ease, box-shadow .2s ease; }
a.dk-dl:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(31, 58, 138, .6); }
.dk-dl.soon { cursor: default; }
@keyframes dk-flow { to { stroke-dashoffset: -22; } }
@keyframes dk-glow { 50% { box-shadow: 0 0 0 4px rgba(27, 175, 122, .12); } }
@keyframes dk-arrive { 0%, 35% { background: #ffffff; } 50% { background: #effaf3; } 70%, 100% { background: #ffffff; } }
@keyframes dk-pop { from { transform: translateY(6px) scale(.985); opacity: .6; } to { transform: none; opacity: 1; } }
@media (max-width: 640px) {
  .dk-wall { aspect-ratio: auto; min-height: 0; padding: 16px; }
  .dk-browser, .dk-sync, .dk-sync-label { display: none; }
  .dk-app { position: relative; left: auto; bottom: auto; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-frame, .hero-chrome > span, .dk-wall, .dk-title, .dk-app { transition: none !important; }
  .dk-sync path, .dk-badge.here, .dk-synced-row, .dk-swap .dk-app { animation: none !important; }
}
