/* Oryzenx — base: tokens, reset, typography, utilities */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-rgb: 37, 99, 235;
  --primary-light: rgba(var(--primary-rgb), .09);
  --secondary: #0ea5e9;
  --accent: #7c3aed;
  --background: #f4f6fb;
  --surface: #ffffff;
  --surface-soft: #f7f9fd;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e5e9f2;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #0284c7;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .05);
  --shadow: 0 6px 18px rgba(15, 23, 42, .07);
  --shadow-lg: 0 18px 40px rgba(15, 23, 42, .14);
  --header-h: 64px;
  --bnav-h: 58px;
  --sidebar-w: 228px;
  --font: "Inter", "Hind Siliguri", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 150ms;
  --t: 220ms;
  color-scheme: light;
}
[data-theme="dark"] {
  --background: #0b1220;
  --surface: #121b2d;
  --surface-soft: #18233a;
  --text: #e7ecf5;
  --text-muted: #94a3b8;
  --border: #233149;
  --primary-light: rgba(var(--primary-rgb), .18);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 6px 18px rgba(0, 0, 0, .35);
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, .5);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #f87171;
  --info: #38bdf8;
  color-scheme: dark;
}

/* Fixed px root keeps type consistent across Android font/display scaling;
   the footer A-/A/A+ control adjusts it deliberately. */
html { font-size: 14px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
html[data-fs="md"] { font-size: 15px; }
html[data-fs="lg"] { font-size: 16.5px; }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; font-family: var(--font); font-size: .9667rem; line-height: 1.55; color: var(--text);
  background: var(--background); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}
:lang(bn) body, body:lang(bn) { line-height: 1.6; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
[data-theme="dark"] a:hover { color: var(--secondary); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.45rem, 1.25rem + .9vw, 1.9rem); }
h2 { font-size: clamp(1.15rem, 1.05rem + .45vw, 1.4rem); }
h3 { font-size: 1.05rem; }
h4 { font-size: .95rem; }
p { margin: 0 0 .75rem; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
code, pre { font-family: var(--mono); font-size: .86em; }
code { background: var(--surface-soft); border: 1px solid var(--border); padding: .05em .35em; border-radius: 5px; }
pre { background: #0f172a; color: #e2e8f0; padding: .9rem; border-radius: var(--radius-sm); overflow: auto; }
pre code { background: none; border: 0; padding: 0; color: inherit; }
table { border-collapse: collapse; width: 100%; }
::selection { background: rgba(var(--primary-rgb), .2); }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: fixed; left: 8px; top: -60px; z-index: 1000; background: var(--primary); color: #fff; padding: 8px 12px; border-radius: 8px; }
.skip-link:focus { top: 8px; color: #fff; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Utilities */
.muted { color: var(--text-muted); }
.small { font-size: .84rem; }
.xs { font-size: .76rem; }
.bold { font-weight: 600; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary); }
.center { text-align: center; }
.right { text-align: right; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }
.row { display: flex; align-items: center; gap: .6rem; }
.row-gap { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.stack > * + * { margin-top: .75rem; }
.grow { flex: 1; min-width: 0; }
.w-full { width: 100%; }
.break { word-break: break-word; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
