contiai / apps /web /src /styles /index.css
aliabozahra315's picture
Claude Opus 5
Give the Arabic bag a presentation file of its own
b4afabc
Raw History Blame Contribute Delete
19.9 kB
@import "tailwindcss";
/* The two brand faces, self-hosted. Both packages ship unicode-range subsets,
so the browser fetches only the ranges a page actually uses and picks the
face per character: Latin and digits resolve to Inter, Arabic to Noto Kufi.
That is the brand rule expressed as font loading rather than as discipline -
there is no way for a screen to get it wrong. */
@import "@fontsource-variable/inter/wght.css";
@import "@fontsource-variable/noto-kufi-arabic/wght.css";
/* ContiAI design tokens.
Values come from brand/tokens.json, which is generated and contrast-verified
by brand/build_palette.py - 47/47 WCAG AA checks including colour-blindness
separation for the chart series. Do not hand-edit hexes here; change the
script and regenerate. */
@theme {
/* ultramarine - the pigment of illuminated manuscripts */
--color-brand-50: #eef1fe;
--color-brand-100: #dfe4fd;
--color-brand-200: #c4cdfb;
--color-brand-300: #9dacf7;
--color-brand-400: #7183f1;
--color-brand-500: #4c5ae8;
--color-brand-600: #3538d9;
--color-brand-700: #2b29bc;
--color-brand-800: #262598;
--color-brand-900: #242579;
--color-brand-950: #16164a;
/* gold - ultramarine's historical companion */
--color-accent-50: #fef8ec;
--color-accent-100: #fceec9;
--color-accent-200: #f9da8e;
--color-accent-300: #f5c053;
--color-accent-400: #f2a72b;
--color-accent-500: #e08a12;
--color-accent-600: #c2680d;
--color-accent-700: #a14a0f;
--color-accent-800: #843a13;
--color-accent-900: #6f3013;
--color-accent-950: #401706;
/* blue-tinted neutrals so surfaces belong to the brand */
--color-ink-0: #ffffff;
--color-ink-50: #f7f8fc;
--color-ink-100: #eff1f7;
--color-ink-200: #e1e5ee;
--color-ink-300: #cbd1e0;
--color-ink-400: #9ba3ba;
--color-ink-500: #6f7893;
--color-ink-600: #525b75;
--color-ink-700: #3f465c;
--color-ink-800: #2c3244;
--color-ink-900: #1c2130;
--color-ink-950: #11141e;
/* Inter leads so Latin words and figures take it; Arabic finds no cover
there and falls through to Kufi. Reversing these two would render the
product's English terms in Kufi's Latin glyphs. */
--font-sans: "Inter Variable", "Noto Kufi Arabic Variable", "Segoe UI", system-ui, sans-serif;
--font-mono: "Cascadia Mono", ui-monospace, Consolas, monospace;
/* The brand type scale - five steps, each carrying its own weight and
leading. Naming them as utilities is what stops the next screen from
inventing another text-[34px]: there is a right answer and it is spelled.
Arabic paragraphs need leading 1.8 or more, so Body carries it and
headings step down only as far as their size earns. */
--text-display: 2.5rem; /* 40 - the page title */
--text-display--line-height: 1.24;
--text-display--font-weight: 800;
--text-display--letter-spacing: -0.01em;
/* The admin's page title. The admin file sets it a step below the product's
40 because an administrative screen carries more per page and the smaller
title leaves the room for it. */
--text-h1: 2.125rem; /* 34 */
--text-h1--line-height: 1.3;
--text-h1--font-weight: 800;
--text-h2: 1.375rem; /* 22 - a section heading on a page */
--text-h2--line-height: 1.45;
--text-h2--font-weight: 700;
--text-subtitle: 1.0625rem; /* 17 - a heading inside a card */
--text-subtitle--line-height: 1.6;
--text-subtitle--font-weight: 700;
/* The figure a tile exists to show. Inter at 800 with tabular figures, and -
unlike every other text role - it may take the tile's own colour.
Three sizes: the hero figure, the stat tile, and the small summary tile. */
--text-metric-lg: 2.375rem; /* 38 - the gradient hero, one per product */
--text-metric-lg--line-height: 1.05;
--text-metric-lg--font-weight: 800;
--text-metric: 2rem; /* 32 */
--text-metric--line-height: 1.1;
--text-metric--font-weight: 800;
--text-metric-sm: 1.5rem; /* 24 */
--text-metric-sm--line-height: 1.15;
--text-metric-sm--font-weight: 800;
/* Two roles the file uses often enough to name: the title of a card in a
chooser, and the title of a row in a list. Both sit below Subtitle, which
heads a card's content rather than naming the card itself. */
--text-title: 1.3125rem; /* 21 */
--text-title--line-height: 1.4;
--text-title--font-weight: 700;
--text-row: 1rem; /* 16 */
--text-row--line-height: 1.5;
--text-row--font-weight: 700;
/* The compact label: a nav row, a run card's title, an inline action. */
--text-item: 0.875rem; /* 14 */
--text-item--line-height: 1.6;
--text-item--font-weight: 600;
--text-body: 0.9375rem; /* 15 */
--text-body--line-height: 1.8;
/* Below the scale sit two support sizes the scale does not name but every
interface needs: the caption under a value, and the uppercase label on a
section. Kept here so they are also not invented per screen. */
--text-caption: 0.84375rem; /* 13.5 */
--text-caption--line-height: 1.7;
/* 12, not the 10 and 11 the screens had reached for. Kufi's counters close
up below about 12px and the label stops being readable, which costs more
than the density gains. */
--text-micro: 0.75rem; /* 12 */
--text-micro--line-height: 1.55;
/* The app file's ladder. It runs softer than the brand book's 6/10/14/20,
which is a deliberate difference: the book specifies print and identity
surfaces, the app file specifies this product. Names keep their meaning -
sm for inline chips, md for controls, lg for tiles, xl for cards.
7px badges and 999px pills are shapes rather than ladder steps and stay
as rounded-[7px] and rounded-full at the call site. */
--radius-sm: 9px;
--radius-md: 11px;
--radius-lg: 14px;
--radius-xl: 18px;
--radius-2xl: 20px;
/* Buttons sit between control and tile in the file, at 13. */
--radius-btn: 13px;
}
/* Semantic roles, redefined per theme. Components only ever read these. */
:root {
color-scheme: light;
--surface: var(--color-ink-0);
--surface-subtle: var(--color-ink-50);
--surface-muted: var(--color-ink-100);
--border-subtle: var(--color-ink-200);
--border-base: var(--color-ink-300);
/* ---- the app composition, from ContiAI App.dc.html ----
The brand book gives the palette and the scale; the app file decides how
they are assembled. Where the two differ the app file wins, because it is
the specific instruction and the book is the general one. */
/* The rail is a dark navy panel, a shade below brand-950. Everything on it
needs its own set of roles - the page tokens are all tuned for ink on
white and none of them read correctly against this ground. */
--rail: #15153f;
--rail-label: #7c7fc8;
--rail-item: #c4cdfb;
--rail-icon: #8a8dd6;
--rail-card: rgb(255 255 255 / 0.06);
--rail-card-bd: rgb(255 255 255 / 0.1);
--rail-role: #9dacf7;
/* Cards carry a border and no shadow. The elevation ladder still exists for
menus and dialogs, but a resting card is defined by its edge. */
--card-bd: #e6e9f2;
/* Quiet fills for chips, variant rows and inline tiles. */
--chip: #f5f6fb;
--chip-bd: #eaecf4;
--track: #eff1f7;
--input-bd: #dde1ec;
/* The gradient on the one hero figure in the product. */
--hero-grad: linear-gradient(135deg, #2b29bc, #4c3fd6);
--text-strong: var(--color-ink-950);
--text-body: var(--color-ink-800);
--text-muted: var(--color-ink-600);
--brand: var(--color-brand-600);
--brand-hover: var(--color-brand-700);
--brand-text: var(--color-brand-700);
--brand-subtle: var(--color-brand-50);
/* a visible-but-quiet brand tint for rules and inactive tracks */
--brand-line: var(--color-brand-200);
--on-brand: #ffffff;
--ok-bg: #e7f6ef;
--ok-bd: #9bd9be;
--ok-fg: #0a5c40;
--warn-bg: #fdf3e3;
--warn-bd: #f0c88a;
--warn-fg: #7c3a06;
--err-bg: #fcebee;
--err-bd: #f0a9b5;
--err-fg: #8e1b2b;
--info-bg: #eef1fe;
--info-bd: #b3bef9;
--info-fg: #262598;
/* Badges are not alerts. The brand draws them without a border and one step
lighter, because a badge labels a row that is fine while an alert
interrupts to say something is not. Keeping the two sets apart is what
stops a table of statuses from reading as a screen full of warnings. */
--badge-ok-bg: #e7f6ef;
--badge-ok-fg: #0a5c40;
--badge-warn-bg: #fef8ec;
--badge-warn-fg: #c2680d;
--badge-err-bg: #fcebee;
--badge-err-fg: #8e1b2b;
--badge-info-bg: #eef1fe;
--badge-info-fg: #2b29bc;
--badge-muted-bg: #eff1f7;
--badge-muted-fg: #525b75;
/* chart series - verified distinguishable under deuteranopia and
protanopia (worst pair delta-E 28.4) */
--viz-1: #2b29bc;
--viz-2: #5a67ce;
--viz-3: #0e7c8c;
--viz-4: #b4650b;
--viz-5: #a8174a;
--viz-6: #7a4a2e;
/* Soft grounds for the same six, used behind icons and chart legends so a
task type keeps one recognisable colour everywhere it appears. */
--tint-1: color-mix(in srgb, var(--viz-1) 10%, var(--surface));
--tint-2: color-mix(in srgb, var(--viz-2) 12%, var(--surface));
--tint-3: color-mix(in srgb, var(--viz-3) 11%, var(--surface));
--tint-4: color-mix(in srgb, var(--viz-4) 12%, var(--surface));
--tint-5: color-mix(in srgb, var(--viz-5) 10%, var(--surface));
--tint-6: color-mix(in srgb, var(--viz-6) 12%, var(--surface));
/* Elevation - the brand's three levels, at its stated values. Ink-tinted
rather than black, so shadows belong to the same blue family as the
surfaces they fall on: resting card, raised (hover), floating (menus). */
--shadow-card: 0 1px 3px rgba(17, 20, 30, 0.08);
--shadow-raised: 0 6px 18px rgba(17, 20, 30, 0.1);
--shadow-float: 0 20px 44px rgba(17, 20, 30, 0.16);
/* The glow under a filled ultramarine element. */
--shadow-brand: 0 16px 40px -14px color-mix(in srgb, var(--brand) 55%, transparent);
}
/* Dark is opt-in, not automatic.
The brand guide is a light document: an ink-on-paper surface with
ultramarine doing the work. Following the operating system would put most
viewers on a dark ground the identity was never drawn for, so dark only
applies when something explicitly stamps data-theme="dark" on the root. */
/* Which copy of the lockup to show.
Its wordmark is black, so a dark surface needs the white file. Tailwind's
`dark:` variant follows the operating system; this app's dark theme is an
explicit stamp on the root and nothing else. Using `dark:` for this puts a
white logo on a white page for anyone whose system is dark and whose ContiAI
is not - which is most people who have ever tried it. */
.on-dark { display: none; }
:root[data-theme="dark"] .on-light { display: none; }
:root[data-theme="dark"] .on-dark { display: block; }
:root[data-theme="dark"] {
color-scheme: dark;
--surface: var(--color-ink-950);
--surface-subtle: var(--color-ink-900);
--surface-muted: var(--color-ink-800);
--border-subtle: var(--color-ink-800);
--border-base: var(--color-ink-700);
--text-strong: var(--color-ink-50);
--text-body: var(--color-ink-200);
--text-muted: var(--color-ink-400);
--brand: var(--color-brand-400);
--brand-hover: var(--color-brand-300);
--brand-text: var(--color-brand-300);
--brand-subtle: var(--color-brand-950);
--on-brand: var(--color-ink-950);
--ok-bg: #0c2a20;
--ok-bd: #1b5943;
--ok-fg: #7fe9c4;
--warn-bg: #2e1f0b;
--warn-bd: #6b4715;
--warn-fg: #f8cd8a;
--err-bg: #30131a;
--err-bd: #6e2733;
--err-fg: #f9a3ad;
--info-bg: #171a3a;
--info-bd: #333a85;
--info-fg: #b3bef9;
--badge-ok-bg: #0c2a20;
--badge-ok-fg: #7fe9c4;
--badge-warn-bg: #2e1f0b;
--badge-warn-fg: #f8cd8a;
--badge-err-bg: #30131a;
--badge-err-fg: #f9a3ad;
--badge-info-bg: #171a3a;
--badge-info-fg: #b3bef9;
--badge-muted-bg: var(--color-ink-800);
--badge-muted-fg: var(--color-ink-300);
/* The rail is already dark, so it barely moves; the page surfaces around it
are what invert. */
--rail: #0d0d28;
--rail-label: #7c7fc8;
--rail-item: #c4cdfb;
--rail-icon: #8a8dd6;
--rail-card: rgb(255 255 255 / 0.06);
--rail-card-bd: rgb(255 255 255 / 0.1);
--rail-role: #9dacf7;
--card-bd: var(--color-ink-800);
--chip: var(--color-ink-900);
--chip-bd: var(--color-ink-800);
--track: var(--color-ink-800);
--input-bd: var(--color-ink-700);
--hero-grad: linear-gradient(135deg, #2b29bc, #4c3fd6);
--viz-1: #9dacf7;
--viz-2: #6e86f5;
--viz-3: #f2a72b;
--viz-4: #d69a55;
--viz-5: #e85c7a;
--viz-6: #e8c9a0;
/* On a dark ground the shadows barely read; depth comes from the surface
step instead, so these stay close to invisible rather than muddy. */
--shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4);
--shadow-raised: 0 8px 24px -10px rgba(0, 0, 0, 0.6);
--shadow-float: 0 16px 48px -12px rgba(0, 0, 0, 0.7);
--shadow-brand: 0 16px 40px -14px color-mix(in srgb, var(--brand) 40%, transparent);
}
html,
body,
#root {
height: 100%;
}
body {
margin: 0;
background: var(--surface);
color: var(--text-body);
font-family: var(--font-sans);
/* Body size and Arabic leading are the default state of the document, so a
paragraph is compliant without anyone remembering to make it so. */
font-size: 0.9375rem;
line-height: 1.8;
-webkit-font-smoothing: antialiased;
}
/* Headings set their own leading through the type scale; without this they
inherit the paragraph's 1.8 and a two-line title drifts apart. */
:where(h1, h2, h3, h4) {
line-height: 1.35;
text-wrap: balance;
}
/* Digits line up in tables and stat tiles. */
.tnum {
font-variant-numeric: tabular-nums;
}
/* An interactive target smaller than 44px fails the brand's accessibility
principle. Icon-only controls carry this so the hit area grows without the
icon or the visible chrome growing with it. */
.tap {
min-inline-size: 44px;
min-block-size: 44px;
display: inline-grid;
place-items: center;
}
*:focus-visible {
outline: 2px solid var(--color-accent-500);
outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
transition-duration: 0.01ms !important;
}
}
/* ---------------------------------------------------------------- motion
Movement is used for one thing only: telling the eye that something new
arrived, or that work is still happening. Nothing decorative loops.
Everything here is short, small in distance, and disabled outright under
prefers-reduced-motion (see the block above). */
@keyframes rise {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: none; }
}
@keyframes fade {
from { opacity: 0; }
to { opacity: 1; }
}
/* A quiet sweep across a progress bar while a step is running - the only
ambient animation in the product, and it stops the moment the run does. */
@keyframes sheen {
from { transform: translateX(100%); }
to { transform: translateX(-100%); }
}
/* Pulsing ring on the step currently executing. */
@keyframes halo {
0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 45%, transparent); }
50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 0%, transparent); }
}
/* Charts draw themselves in once. Bars grow from the baseline, donut
segments sweep round, the area line traces its own path - each says
"this is data arriving", then holds still. */
@keyframes grow-y {
from { transform: scaleY(0); }
to { transform: scaleY(1); }
}
@keyframes grow-x {
from { transform: scaleX(0); }
to { transform: scaleX(1); }
}
@keyframes trace {
from { stroke-dashoffset: var(--trace-length, 600); }
to { stroke-dashoffset: 0; }
}
.chart-bar {
transform-origin: bottom;
animation: grow-y 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.chart-fill {
transform-origin: var(--fill-origin, right);
animation: grow-x 0.8s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.chart-trace {
stroke-dasharray: var(--trace-length, 600);
animation: trace 1.1s ease-out backwards;
}
/* The one hover treatment every interactive card shares: a slight lift and a
deeper shadow. Defined once so no card invents its own physics. */
.lift {
transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease,
border-color 0.25s ease;
}
.lift:hover {
transform: translateY(-3px);
box-shadow: var(--shadow-raised);
}
.stagger > * {
animation: rise .3s ease-out backwards;
}
.stagger > *:nth-child(1) { animation-delay: 0ms }
.stagger > *:nth-child(2) { animation-delay: 40ms }
.stagger > *:nth-child(3) { animation-delay: 80ms }
.stagger > *:nth-child(4) { animation-delay: 120ms }
.stagger > *:nth-child(5) { animation-delay: 160ms }
.stagger > *:nth-child(6) { animation-delay: 200ms }
.stagger > *:nth-child(n+7) { animation-delay: 240ms }
/* Sections arrive as the reader reaches them.
The rule at the top of this block still holds - movement says "something
new arrived" and then stops. On a page that is read rather than operated,
what arrives is the section itself, once, on the way down and never again.
`.stagger` above supplies the cascade inside it. */
@keyframes rise-far {
from { opacity: 0; transform: translateY(16px); }
to { opacity: 1; transform: none; }
}
.reveal { animation: rise-far 0.55s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
/* Armed, waiting to be reached. No transition on this state deliberately:
arming happens in a layout effect just after the first render, and a
transition here would play as a fade-OUT of content the reader had already
seen. Hiding is instant; only arriving is animated. */
.awaiting { opacity: 0; }
/* The rail draws itself downward, one segment behind each node, and each node
lands before the words beside it. It is the one place on the page where the
motion carries meaning rather than attention: the section's claim is that
the stages hand work to each other in order, and this is that sentence
drawn. */
@keyframes draw-down {
from { transform: scaleY(0); }
to { transform: scaleY(1); }
}
@keyframes pop {
from { opacity: 0; transform: scale(0.4); }
to { opacity: 1; transform: none; }
}
.draw-down { animation: draw-down 0.5s ease-out backwards; }
.pop { animation: pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
/* The hero plays once on load, as one sequence rather than six arrivals. */
.entrance > * { animation: rise-far 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
.entrance > *:nth-child(1) { animation-delay: 60ms }
.entrance > *:nth-child(2) { animation-delay: 140ms }
.entrance > *:nth-child(3) { animation-delay: 220ms }
.entrance > *:nth-child(4) { animation-delay: 300ms }
.entrance > *:nth-child(5) { animation-delay: 380ms }
@keyframes settle {
from { opacity: 0; transform: scale(0.94); }
to { opacity: 1; transform: none; }
}
.settle { animation: settle 0.9s cubic-bezier(0.22, 1, 0.36, 1) 200ms backwards; }
/* A control should answer the finger before the navigation does. */
.press { transition: transform 0.12s ease, box-shadow 0.2s ease, background-color 0.2s ease; }
.press:active { transform: scale(0.975); }
/* A 36px control with a 44px touch target: the brand asks for 44 and a
language switch beside a logo has no room for it. The visual stays small
and the finger gets the whole square. */
.tap-44 { position: relative; }
.tap-44::after {
content: "";
position: absolute;
top: 50%;
left: 50%;
width: 44px;
height: 44px;
transform: translate(-50%, -50%);
}
.running-halo { animation: halo 2s ease-in-out infinite; }
.sheen { position: relative; overflow: hidden; }
.sheen::after {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(90deg,
transparent,
color-mix(in srgb, #fff 45%, transparent),
transparent);
animation: sheen 1.6s ease-in-out infinite;
}