diff --git a/website/src/components/ask-ai/css/AskAI.css b/website/src/components/ask-ai/css/AskAI.css index 484de2a..e0cb1fb 100644 --- a/website/src/components/ask-ai/css/AskAI.css +++ b/website/src/components/ask-ai/css/AskAI.css @@ -14,8 +14,9 @@ cursor: pointer; } +/* One step darker than the search pill (emphasis-200), so the hover shows. */ .kite-ask-ai-option:hover { - background-color: var(--ifm-color-emphasis-200); + background-color: var(--ifm-color-emphasis-300); } .kite-ask-ai-icon { @@ -33,8 +34,9 @@ padding: 3px 6px; border-radius: 999px; /* Muted neutral so it reads as "not yet available" (not a feature - highlight) and clears WCAG AA contrast in both color modes. */ - background-color: var(--ifm-color-emphasis-200); + highlight). White, not gray, so the pill shows on the gray search + box. Gray-700 text on white clears WCAG AA. */ + background-color: var(--ifm-color-emphasis-0); color: var(--ifm-color-emphasis-700); } diff --git a/website/src/components/custom-search/css/CustomSearch.css b/website/src/components/custom-search/css/CustomSearch.css index 8deb741..1bfbe1a 100644 --- a/website/src/components/custom-search/css/CustomSearch.css +++ b/website/src/components/custom-search/css/CustomSearch.css @@ -1,5 +1,5 @@ /* Segmented "Ask AI | Search" control in the navbar. Uses Infima theme - variables so it adapts to both light and dark color modes. */ + variables for its colors. */ .kite-segmented-search { display: flex; align-items: stretch; @@ -31,36 +31,6 @@ background-color: transparent; } -/* In the blue navbar, use kite.ai's dark glass pill instead of the - theme's gray border. */ -.navbar .kite-segmented-search { - border-color: var(--kite-glass-border); - border-radius: 12px; - background-color: var(--kite-glass-bg); -} - -.navbar .kite-segmented-search .kite-ask-ai-option { - border-right-color: var(--kite-glass-border); -} - -.navbar .kite-ask-ai-option:hover { - background-color: rgba(255, 255, 255, 0.12); -} - -/* Translucent badge so it matches the glass pill. Keep the white tint - light: more tint lowers white-text contrast (0.12 gives about 5.1:1). */ -.navbar .kite-ask-ai-badge { - background-color: rgba(255, 255, 255, 0.12); - color: #ffffff; -} - -/* On hover the option already gets a white tint. Drop the badge's own - tint so the two do not stack (stacked gives about 4:1, below AA). */ -.navbar .kite-ask-ai-option:hover .kite-ask-ai-badge { - background-color: transparent; - box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5); -} - /* Keep the two halves visually divided. */ .kite-segmented-search .kite-ask-ai-option { border-right: 1px solid var(--ifm-color-emphasis-300); diff --git a/website/src/css/custom.css b/website/src/css/custom.css index d1c0bda..5a004bf 100644 --- a/website/src/css/custom.css +++ b/website/src/css/custom.css @@ -1,17 +1,9 @@ /** - * Kite Documentation - Brand Theme - * Matches the kite.ai "sky" look: the whole page sits on kite.ai's blue - * gradient, with a white wordmark and Inter Display-style headings. The - * article is a white card, so long pages stay easy to read. + * Kite Documentation - Theme + * Standard Docusaurus colors with a Kite blue accent, and Inter Display-style + * headings like kite.ai. * - * The site is light only, like kite.ai (colorMode.disableSwitch in - * docusaurus.config.js). - * - * kite.ai's sky is too light for white text on its own (as low as 2:1 - * under the cloud glows). So the sidebar, table of contents and footer - * text sit on dark glass panels, like kite.ai's nav pill. White text on - * that glass is at least 4.9:1 everywhere on the sky (WCAG AA). Do not - * put backdrop-filter on .navbar (see the navbar rule). + * The site is light only (colorMode.disableSwitch in docusaurus.config.js). */ /* Inter with the optical-size axis, so large headings render like @@ -23,7 +15,7 @@ --ifm-heading-font-family: 'Inter', system-ui, -apple-system, sans-serif; --ifm-heading-font-weight: 600; - /* Link and button blue, used on the white card. */ + /* Link and button blue. White text on it is 4.9:1. */ --ifm-color-primary: #2f72c0; --ifm-color-primary-dark: #2a67ad; --ifm-color-primary-darker: #2861a3; @@ -32,58 +24,8 @@ --ifm-color-primary-lighter: #4a87cf; --ifm-color-primary-lightest: #6d9dd8; - --ifm-background-color: #fcfbf9; - --ifm-background-surface-color: #ffffff; - --ifm-font-color-base: #2e3a52; - --ifm-heading-color: #17223b; - --ifm-font-color-secondary: #52617b; - - --ifm-global-radius: 12px; --ifm-code-font-size: 95%; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); - - /* kite.ai's sky, exactly (its .sky-bg layer): four soft white cloud - glows over a blue gradient that runs light, dark, light down the - page. */ - --kite-sky-top: rgb(57, 135, 210); - --kite-sky-page: - radial-gradient(55% 14% at 1% 34%, rgba(255, 255, 255, 0.34), rgba(0, 0, 0, 0) 72%), - radial-gradient(58% 14% at 99% 29%, rgba(255, 255, 255, 0.28), rgba(0, 0, 0, 0) 70%), - radial-gradient(70% 12% at 5% 74%, rgba(255, 255, 255, 0.23), rgba(0, 0, 0, 0) 72%), - radial-gradient(45% 9% at 97% 88%, rgba(255, 255, 255, 0.22), rgba(0, 0, 0, 0) 74%), - linear-gradient( - rgb(57, 135, 210) 0%, - rgb(116, 157, 193) 50%, - rgb(57, 135, 210) 77%, - rgb(116, 157, 193) 100% - ); - --kite-card-bg: #ffffff; - --kite-card-shadow: 0 24px 60px rgba(15, 35, 70, 0.18); - - /* Navy glass behind white text on the sky. Navy, not black, so the - panels stay blue instead of turning the sky gray. The cloud glows sit - behind the sidebar and table of contents, so it needs 0.5 to keep - white text at 4.9:1 or better. */ - --kite-text-glass: rgba(12, 38, 72, 0.5); - /* Highlight for the current item, on top of the text glass. */ - --kite-glass-active: rgba(0, 0, 0, 0.2); - --kite-glass-hover: rgba(0, 0, 0, 0.15); - - /* Search pill in the navbar: the same 0.3 black as kite.ai's nav pill. - Keeps the placeholder (4.96:1) and Coming soon badge (5.08:1) above - AA on the navbar blue. */ - --kite-glass-bg: rgba(0, 0, 0, 0.3); - --kite-glass-border: rgba(255, 255, 255, 0.22); - - --ifm-navbar-background-color: var(--ifm-background-color); - /* White navbar links are for the blue top bar only. Anything that - renders on the page background must not use this variable. */ - --ifm-navbar-link-color: #ffffff; - --ifm-navbar-link-hover-color: #ffffff; - --ifm-navbar-search-input-background-color: transparent; - --ifm-navbar-search-input-color: #ffffff; - --ifm-navbar-search-input-placeholder-color: rgba(255, 255, 255, 0.8); - --ifm-navbar-search-input-icon: url('data:image/svg+xml;utf8,'); } /* Headings: tight tracking like kite.ai's display type. */ @@ -101,229 +43,59 @@ h3, letter-spacing: -0.025em; } -/* Page: the sky sits behind everything. It is 3300px tall, the height of - kite.ai's pricing page, so the cloud glows keep kite.ai's proportions - on every page. Below that, long pages continue in the sky's last color. - min-height stops the sky repeating on short pages. */ -html { - min-height: 100%; - background: var(--kite-sky-page); - background-size: 100% 3300px; - background-repeat: no-repeat; - background-color: rgb(116, 157, 193); -} - -/* Article card. Uses stable markup only, not Docusaurus's hashed module - classes: - - Doc pages: the first column of the docs row. It holds the article - whether or not the page has a table of contents. - - Generated category index pages: the block that replaces that row. - - Search and 404 pages: they put their content straight in - .main-wrapper. */ -.main-wrapper main > .container > .row > .col:first-child, -.main-wrapper main > .container > :not(.row), -.main-wrapper > .container { - margin-top: 1.5rem; - margin-bottom: 2.5rem; - padding: 2rem 2.5rem; - border-radius: 24px; - background-color: var(--kite-card-bg); - box-shadow: var(--kite-card-shadow); -} - -@media (max-width: 996px) { - /* Keep a strip of sky on each side, like kite.ai's cards. */ - .main-wrapper main > .container > .row > .col:first-child, - .main-wrapper main > .container > :not(.row), - .main-wrapper > .container { - margin: 0.75rem 0.75rem 1.5rem; - /* Both elements are full width on mobile, so subtract the side - margins or the page scrolls sideways. */ - max-width: calc(100% - 1.5rem); - padding: 1.25rem; - border-radius: 16px; - } -} - -/* Navbar: the top color of the sky, solid so the card does not show - through when it scrolls under. The bar holds no plain white text, only - the logo, the glass search pill, the white button and icons (3.8:1, - above the 3:1 needed for icons). Do not add backdrop-filter here: it - makes .navbar the containing block for the fixed mobile drawer inside - it, which then clips to the navbar's height. */ -.navbar { - background: var(--kite-sky-top); - border-bottom: 0; - box-shadow: none; -} - .navbar__logo { height: 1.6rem; } -.navbar__logo img { - /* Turn the orange wordmark white, as on kite.ai. */ - filter: brightness(0) invert(1); -} - -.navbar__link { - font-weight: 500; -} - -.navbar__link:hover { - text-decoration: underline; - text-underline-offset: 4px; -} - -/* White focus rings for everything on the sky. Some browsers draw a blue - default ring, which disappears on the blue background. */ -.navbar__inner a:focus-visible, -.navbar__inner button:focus-visible, -.navbar__inner input:focus-visible, -.navbar-sidebar__brand a:focus-visible, -.navbar-sidebar__brand button:focus-visible, -.theme-doc-sidebar-container a:focus-visible, -.theme-doc-sidebar-container button:focus-visible, -.theme-doc-toc-desktop a:focus-visible, -.footer a:focus-visible { - outline: 2px solid #ffffff; - outline-offset: 2px; -} - -/* "Try Kite" link styled as kite.ai's white Get Started button. +/* "Try Kite" link styled as a solid button. order: 1 keeps it last among the right-hand navbar items. The extra .navbar beats Infima's `.navbar__items--right > :last-child` rule, which removes right padding from the last item. */ .navbar .navbar__link.kite-nav-cta { order: 1; + display: inline-flex; + align-items: center; + /* Same height as the search box next to it. */ + height: 36px; white-space: nowrap; margin-left: 0.5rem; - padding: 0.45rem 1.1rem; - border-radius: 12px; - background-color: #ffffff; - color: #18190f; + padding: 0 1.1rem; + border-radius: 8px; + background-color: var(--ifm-color-primary); + color: #ffffff; font-weight: 600; } -.navbar__link.kite-nav-cta:hover { - background-color: rgba(255, 255, 255, 0.88); - color: #18190f; - text-decoration: none; -} - -.navbar__link.kite-nav-cta svg { - display: none; -} - -/* Hamburger and drawer close icons sit on the blue bar. Scope to the bar - and the drawer header only: the mobile drawer's "Back to main menu" - button is also a .clean-btn inside .navbar, and it sits on the light - page background. */ -.navbar__inner .clean-btn, -.navbar-sidebar__brand .clean-btn, -.navbar__toggle { +.navbar .navbar__link.kite-nav-cta:hover { + background-color: var(--ifm-color-primary-dark); color: #ffffff; } -/* Mobile drawer: keep the blue header strip, but put the menu on the - off-white --ifm-background-color, not the sky. The drawer's menu uses - the default dark menu colors. */ -.navbar-sidebar { - background-color: var(--ifm-background-color); -} - -.navbar-sidebar__brand { - background: var(--kite-sky-top); +/* Offset ring so keyboard focus stands apart from the blue fill. */ +.navbar__link.kite-nav-cta:focus-visible, +.navbar-sidebar .menu__link.kite-nav-cta:focus-visible { + outline: 2px solid var(--ifm-color-primary); + outline-offset: 2px; } -/* The close icon hard-codes a gray stroke on its SVG. */ -.navbar-sidebar__close svg g { - stroke: #ffffff; +.navbar__link.kite-nav-cta svg { + display: none; } -/* Footer: transparent so the sky continues behind it. The copyright sits - on a glass pill, because white text on the light bottom of the sky is - only 2.9:1. */ -.footer, -.footer--dark { - --ifm-footer-link-color: #ffffff; - --ifm-footer-link-hover-color: #ffffff; - background: transparent; - border-top: 0; +/* The same button in the mobile drawer. */ +.navbar-sidebar .menu__link.kite-nav-cta { + justify-content: center; + background-color: var(--ifm-color-primary); color: #ffffff; -} - -.footer__copyright { - display: inline-block; - padding: 0.4rem 1rem; - border-radius: 999px; - background-color: var(--kite-text-glass); -} - -/* Sidebar menu: rounded items. In the mobile drawer (light page - background) the active item gets a soft blue tint. */ -.menu__link { - border-radius: 8px; -} - -.menu__link--active:not(.menu__link--sublist) { - background-color: rgba(47, 114, 192, 0.1); - font-weight: 600; -} - -/* Desktop sidebar: a dark glass panel on the sky with white text. */ -.theme-doc-sidebar-container { - --ifm-toc-border-color: transparent; -} - -.theme-doc-sidebar-container .menu { - --ifm-menu-color: #ffffff; - --ifm-menu-color-active: #ffffff; - --ifm-menu-color-background-hover: var(--kite-glass-hover); - --ifm-menu-color-background-active: var(--kite-glass-active); - --ifm-menu-link-sublist-icon: url('data:image/svg+xml;utf8,'); - /* Overrides Docusaurus's announcement-bar bottom margin. Revisit if an - announcement bar is added. */ - margin: 1.5rem 0.75rem 1.5rem 1rem; - border-radius: 20px; - background-color: var(--kite-text-glass); - backdrop-filter: blur(12px); -} - -html .theme-doc-sidebar-container .menu__link--active:not(.menu__link--sublist) { - background-color: var(--kite-glass-active); -} - -/* Table of contents: the same dark glass panel. */ -.theme-doc-toc-desktop { - --ifm-toc-border-color: transparent; - --ifm-toc-link-color: #ffffff; - --ifm-color-primary: #ffffff; - padding: 0.75rem 0.5rem; - border-radius: 20px; - background-color: var(--kite-text-glass); - backdrop-filter: blur(12px); -} - -/* Current section: bold plus the same highlight as the sidebar, so it - does not rely on font weight alone. */ -.theme-doc-toc-desktop .table-of-contents__link--active { - margin-left: -0.5rem; - padding: 0.1rem 0.5rem; - border-radius: 6px; - background-color: var(--kite-glass-active); font-weight: 600; } -/* Draw the focus ring inside the link. The active link reaches the - panel edge, so an outside ring would land on the bare sky. */ -.theme-doc-toc-desktop a:focus-visible { - outline-offset: -2px; +.navbar-sidebar .menu__link.kite-nav-cta:hover { + background-color: var(--ifm-color-primary-dark); } -.theme-doc-toc-desktop .table-of-contents__link:hover { - text-decoration: underline; - text-underline-offset: 3px; +.navbar-sidebar .menu__link.kite-nav-cta svg { + display: none; } /* Doc screenshots: center and never upscale past native size.