/* Base: tokens, background, type, buttons, header, footer, dialogs. Original styles for this template. */
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/inter-tight-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/inter-tight-latin-ext-wght-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --font: 'Inter Tight', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --accent: #5b94ff; --accent-2: #9b6bff; --on-accent: #060a18;
  --r-s: 12px; --r: 20px; --r-l: 30px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dir: 1;
}
:root[dir='rtl'] { --dir: -1; }
:root[data-mode='dark'] {
  color-scheme: dark;
  --bg: #07080d; --bg-2: #0d1019; --solid: #10131e;
  --surface: rgba(255, 255, 255, .05); --surface-2: rgba(255, 255, 255, .09);
  --line: rgba(255, 255, 255, .1); --line-2: rgba(255, 255, 255, .2);
  --text: #f3f5fa; --muted: #a6aec0; --faint: #8089a0;
  --accent-text: var(--accent);
  --card: linear-gradient(160deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .02));
  --shadow: 0 30px 70px -28px rgba(0, 0, 0, .75);
  --blob: .5; --grain: .05;
}
:root[data-mode='light'] {
  color-scheme: light;
  --bg: #f3f5fb; --bg-2: #ffffff; --solid: #ffffff;
  --surface: rgba(15, 18, 32, .045); --surface-2: rgba(15, 18, 32, .08);
  --line: rgba(15, 18, 32, .1); --line-2: rgba(15, 18, 32, .2);
  --text: #0e1222; --muted: #525d77; --faint: #66718a;
  --accent-text: color-mix(in srgb, var(--accent) 55%, #000);
  --card: linear-gradient(160deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .7));
  --shadow: 0 24px 60px -30px rgba(20, 30, 70, .35);
  --blob: .28; --grain: .035;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 400 1rem/1.55 var(--font); font-feature-settings: 'cv11', 'ss03'; -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body::after { /* film grain */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 200; opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
::selection { background: color-mix(in srgb, var(--accent) 45%, transparent); }

/* Aurora background */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; opacity: var(--blob); will-change: transform; }
.b1 { top: -30vmax; inset-inline-start: -20vmax; background: radial-gradient(circle, var(--accent) 0%, transparent 62%); animation: drift1 38s ease-in-out infinite alternate; }
.b2 { top: 30vh; inset-inline-end: -28vmax; background: radial-gradient(circle, var(--accent-2) 0%, transparent 62%); animation: drift2 46s ease-in-out infinite alternate; }
.b3 { bottom: -38vmax; inset-inline-start: 20vw; width: 60vmax; height: 60vmax; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 60%, var(--accent-2)) 0%, transparent 62%); opacity: calc(var(--blob) * .7); animation: drift1 52s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate3d(12vmax, 8vmax, 0) scale(1.1); } }
@keyframes drift2 { to { transform: translate3d(-10vmax, -6vmax, 0) scale(1.15); } }

/* Layout & utilities */
.wrap { width: min(1320px, 100% - clamp(32px, 6vw, 80px)); margin-inline: auto; }
.section { padding-block: clamp(36px, 6vw, 84px); }
.page { padding-block: 32px 80px; }
.page h1 { margin-block: 4px 24px; }
.pdp { padding-block: 28px 80px; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; inset-inline-start: 12px; top: -60px; z-index: 300; background: var(--solid); padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-2); }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.boot { padding: 120px 24px; text-align: center; color: var(--muted); }
.eyebrow { display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); }
.eyebrow.pill { padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); backdrop-filter: blur(10px); }
.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; }
.link-arrow svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.link-arrow:hover svg { transform: translateX(calc(4px * var(--dir))); }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; font-size: .85rem; cursor: pointer; }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.crumb svg { width: 14px; height: 14px; opacity: .7; }
.crumb a:hover { color: var(--text); }
:root[dir='rtl'] .crumb svg, :root[dir='rtl'] .link-arrow svg, :root[dir='rtl'] .chev { transform: scaleX(-1); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: .72rem 1.2rem; border-radius: 999px; border: 1px solid transparent; font-weight: 650; line-height: 1; cursor: pointer; transition: transform .2s var(--ease), box-shadow .25s, background .2s, border-color .2s; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.lg { padding: 1rem 1.6rem; font-size: 1.04rem; }
.btn.block { width: 100%; }
.btn.grow { flex: 1; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--on-accent); box-shadow: 0 14px 34px -14px var(--accent); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -14px var(--accent); }
.btn.ghost { background: var(--surface); border-color: var(--line-2); backdrop-filter: blur(10px); }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--accent); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn[aria-pressed='true'] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.btn[aria-pressed='true'] svg { color: var(--accent-text); fill: color-mix(in srgb, var(--accent) 60%, transparent); }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); transition: background .2s, border-color .2s, transform .2s var(--ease); flex: none; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--surface-2); border-color: var(--accent); transform: translateY(-1px); }
.icon-btn[aria-pressed='true'] { border-color: var(--accent); color: var(--accent-text); }
.icon-btn[aria-pressed='true'] svg { fill: color-mix(in srgb, var(--accent) 55%, transparent); }
.icon-btn.danger:hover { border-color: #ff6b81; color: #ff6b81; }
.count { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--on-accent); font-size: .7rem; font-weight: 800; display: grid; place-items: center; }

/* Forms */
input[type='search'], input[type='number'], input[type='email'], select { background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: .65rem 1rem; color: var(--text); min-width: 0; }
select { padding-inline-end: 2rem; }
select option { background: var(--solid); color: var(--text); }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
input[disabled], button[disabled] { cursor: not-allowed; }
.check { display: flex; align-items: center; gap: .6rem; padding: .3rem 0; cursor: pointer; font-size: .95rem; }
.check input { accent-color: var(--accent); width: 17px; height: 17px; margin: 0; }
.check em { margin-inline-start: auto; font-style: normal; color: var(--faint); font-size: .8rem; }
.field { display: grid; gap: .3rem; font-size: .85rem; color: var(--muted); }

/* Announcement marquee */
.announce { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 22%, var(--bg)), color-mix(in srgb, var(--accent-2) 22%, var(--bg))); border-bottom: 1px solid var(--line); overflow: hidden; font-size: .82rem; font-weight: 600; }
.marquee { display: flex; width: max-content; animation: marq 46s linear infinite; padding-block: 8px; }
.announce:hover .marquee { animation-play-state: paused; }
.marquee-track { display: flex; gap: 3.5rem; padding-inline-end: 3.5rem; white-space: nowrap; }
.marquee-track span::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-inline-end: .9rem; background: var(--accent); vertical-align: middle; }
@keyframes marq { to { transform: translateX(-50%); } }
:root[dir='rtl'] .marquee { animation-direction: reverse; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(18px) saturate(150%); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); padding-block: 12px; }
.logo { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.2rem; letter-spacing: -.03em; flex: none; }
.logo-mark svg { width: 34px; height: 34px; display: block; }
.search { position: relative; flex: 1; max-width: 640px; margin-inline: auto; }
.search input { width: 100%; padding-inline: 46px 48px; height: 46px; background: var(--surface); border-color: var(--line); transition: border-color .2s, box-shadow .2s, background .2s; }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); background: var(--surface-2); }
.search-ico { position: absolute; inset-inline-start: 16px; top: 13px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.kbd { position: absolute; inset-inline-end: 14px; top: 11px; border: 1px solid var(--line-2); border-radius: 8px; padding: 1px 8px; color: var(--faint); font-size: .8rem; pointer-events: none; }
.suggest { position: absolute; inset-inline: 0; top: calc(100% + 10px); background: var(--solid); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow); padding: 8px; z-index: 70; max-height: 70vh; overflow: auto; }
.suggest li a { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 8px; border-radius: 14px; }
.suggest li[aria-selected='true'] a, .suggest li a:hover { background: var(--surface-2); }
.sg-art { width: 52px; height: 52px; border-radius: 12px; background: var(--surface); display: grid; place-items: center; overflow: hidden; }
.sg-art .art svg { width: 44px; height: 44px; }
.sg-t { display: grid; min-width: 0; } .sg-t strong { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sg-t small { color: var(--muted); }
.sg-p { font-weight: 700; }
.suggest .none, .suggest .all { padding: 10px; color: var(--muted); }
.suggest .all a { display: block; padding: 10px; color: var(--accent-text); font-weight: 600; text-align: center; }
.actions { display: flex; align-items: center; gap: 8px; flex: none; }
.only-m { display: none; }
.btn.only-m { display: none; }

.navrow { display: flex; align-items: center; gap: 28px; padding-block: 6px 12px; }
.dept-btn { display: inline-flex; align-items: center; gap: .6rem; padding: .62rem 1rem; border-radius: 999px; border: 1px solid transparent; background: linear-gradient(var(--solid), var(--solid)) padding-box, linear-gradient(135deg, var(--accent), var(--accent-2)) border-box; font-weight: 650; }
.dept-btn svg { width: 18px; height: 18px; } .dept-btn .chev { width: 16px; height: 16px; transition: transform .25s; }
.dept-btn[aria-expanded='true'] .chev { transform: rotate(180deg); }
.navlinks { display: flex; gap: 6px; flex-wrap: wrap; }
.navlinks a, .navright a { position: relative; padding: .5rem .8rem; border-radius: 999px; font-weight: 550; color: var(--muted); transition: color .2s, background .2s; }
.navlinks a:hover, .navright a:hover { color: var(--text); background: var(--surface); }
.navright { margin-inline-start: auto; display: flex; gap: 6px; }
.mega { position: absolute; inset-inline: 0; top: 100%; background: var(--solid); border-bottom: 1px solid var(--line-2); box-shadow: var(--shadow); animation: fade .25s var(--ease); }
.mega-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 28px; padding-block: 28px 34px; }
.mega-title { font-weight: 700; font-size: 1.05rem; } .mega-title:hover { color: var(--accent-text); }
.mega-col ul { margin-top: 10px; display: grid; gap: 4px; } .mega-col li a { display: block; padding: 4px 0; color: var(--muted); } .mega-col li a:hover { color: var(--text); padding-inline-start: 6px; transition: padding .2s; }
@keyframes fade { from { opacity: 0; transform: translateY(-6px); } }

/* Dialogs */
.dlg { border: 1px solid var(--line-2); background: var(--solid); color: var(--text); padding: 0; box-shadow: var(--shadow); }
.dlg::backdrop { background: rgba(3, 4, 10, .62); backdrop-filter: blur(6px); animation: fade .25s; }
.dlg.drawer { margin: 0; margin-inline-start: auto; height: 100dvh; max-height: 100dvh; width: min(470px, 100vw); border-radius: 28px 0 0 28px; display: flex; flex-direction: column; animation: slidein .4s var(--ease); }
:root[dir='rtl'] .dlg.drawer { border-radius: 0 28px 28px 0; }
.dlg.drawer[open] { display: flex; }
.dlg.drawer.left { margin-inline-start: 0; margin-inline-end: auto; border-radius: 0 28px 28px 0; animation-name: slideleft; }
@keyframes slidein { from { transform: translateX(calc(60px * var(--dir))); opacity: 0; } }
@keyframes slideleft { from { transform: translateX(calc(-60px * var(--dir))); opacity: 0; } }
.dlg.modal { width: min(960px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; border-radius: var(--r-l); padding: clamp(18px, 3vw, 32px); animation: pop .35s var(--ease); }
.dlg.narrow { width: min(540px, calc(100vw - 24px)); }
@keyframes pop { from { transform: translateY(18px) scale(.97); opacity: 0; } }
.dlg-x { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.m-nav { padding: 12px 22px 40px; display: grid; gap: 6px; overflow: auto; }
.m-nav > a, .m-title { padding: 10px 0; font-weight: 650; font-size: 1.1rem; }
.m-group { border-top: 1px solid var(--line); padding-top: 8px; } .m-subs { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 10px; }
.m-subs a { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .9rem; color: var(--muted); }

/* Toast */
.toast { position: fixed; inset-inline: 0; bottom: 22px; margin-inline: auto; width: max-content; max-width: calc(100vw - 32px); z-index: 400; padding: .8rem 1.2rem; border-radius: 999px; background: var(--solid); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-weight: 600; opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .3s, transform .3s var(--ease); }
.toast.show { opacity: 1; transform: none; }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: start; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; width: 34%; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }

/* Footer */
.site-footer { margin-top: 40px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(12px); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; padding-block: 56px 36px; }
.site-footer .foot-h { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.site-footer li { margin-bottom: 8px; } .site-footer li a { color: var(--muted); } .site-footer li a:hover { color: var(--text); }
.news { display: flex; gap: 8px; margin-block: 14px 6px; flex-wrap: wrap; } .news input { flex: 1 1 160px; min-width: 0; }
.accent-row { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.accent-btn { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; background: linear-gradient(135deg, var(--a), var(--b)); padding: 0; position: relative; }
.accent-btn[aria-checked='true'] { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--text); }
.foot-set .field, .foot-set .check { margin-bottom: 8px; }
.foot-note { border-top: 1px solid var(--line); padding-block: 22px 40px; color: var(--muted); }
.foot-note p { margin-bottom: 4px; }

@media (max-width: 900px) {
  .only-m { display: inline-grid; }
  .btn.only-m { display: inline-flex; }
  .navrow { display: none; }
  .bar { gap: 10px; }
  .logo-text { display: none; }
  .search { margin-inline: 0; }
  .kbd { display: none; }
  .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-block: 40px 24px; }
  .foot-brand { grid-column: 1 / -1; }
  .site-header { backdrop-filter: blur(10px); }
}
@media (max-width: 640px) {
  .hide-s { display: none; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .search input { padding-inline: 42px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
