/* Along AI Design System 077b1b4 primitives with SGX product colours from sgxmeta.ai. */
@font-face { font-family: Inter; src: url('/brand/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
:root {
  --font-sans: Inter, Arial, sans-serif;
  --background: #fcfbfc;
  --foreground: #0f172a;
  --card: #fff;
  --muted: #f7f4f6;
  --muted-foreground: #535f70;
  --border: #eadfe4;
  --input: #a795a1;
  --ring: #a4173c;
  --brand: #c8103e;
  --brand-deep: #9d122f;
  --brand-tint: #fbedf1;
  --brand-green: #247952;
  --action-ink: #fff;
  --panel-shadow: 0 18px 55px #30203012, 0 2px 7px #3020300a;
}
:root[data-theme="dark"] {
  --background: #11121a;
  --foreground: #f4f3f7;
  --card: #1b1c27;
  --muted: #181923;
  --muted-foreground: #bac0cf;
  --border: #3a3342;
  --input: #8b7c90;
  --ring: #ff829d;
  --brand: #ff829d;
  --brand-deep: #f16b8a;
  --brand-tint: #351f2d;
  --brand-green: #7cd8aa;
  --action-ink: #20101b;
  --panel-shadow: 0 18px 55px #0004;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--foreground); background: var(--background); font: var(--type-body-size)/var(--type-body-leading) var(--font-sans); }
button, input, select { font: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }
.sr-only, .skip-link:not(:focus) { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: absolute; z-index: 2; top: var(--space-3); left: var(--space-3); padding: var(--space-3); background: var(--card); }
.topbar { min-height: 4.5rem; margin: var(--space-3) var(--layout-page-gutter) 0; padding: var(--space-2) var(--space-4); border: 1px solid var(--border); border-radius: 1.15rem; background: var(--card); box-shadow: var(--panel-shadow); display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.brand { display: inline-flex; gap: var(--space-3); align-items: center; font-size: var(--type-subheading-size); font-weight: 750; text-decoration: none; min-height: 44px; }
.brand-muted, .hint, .empty p, small, .sort, .breadcrumbs { color: var(--muted-foreground); }
.brand-logo { display: block; object-fit: contain; flex: none; }
.avatar { display: grid; place-content: center; inline-size: 2rem; block-size: 2rem; border-radius: var(--radius-md); background: var(--brand-tint); color: var(--brand); }
.btn.primary { color: var(--action-ink); background: linear-gradient(135deg, var(--brand), var(--brand-deep)); box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 18%, transparent); font-weight: 750; }
@media (hover: hover) { .btn.primary:not(:disabled):hover { background: var(--brand-deep); } }
.account-bar, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); }
.appearance { display: flex; border: 1px solid var(--border); border-radius: var(--radius-lg); margin: 0; padding: 0 var(--space-1); background: var(--muted); }
.appearance label { position: relative; cursor: pointer; }
.appearance input { position: absolute; opacity: 0; }
.appearance span { display: grid; align-items: center; min-height: 44px; padding-inline: var(--space-3); border-radius: var(--radius-md); }
.appearance input:checked + span { background: var(--card); font-weight: 650; }
.appearance input:focus-visible + span { outline: 2px solid var(--ring); outline-offset: -2px; }
.auth { max-width: var(--content-workspace); margin: clamp(var(--space-8), 11vh, var(--space-24)) auto; padding-inline: var(--layout-page-gutter); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(var(--space-8), 6vw, var(--space-24)); align-items: center; }
.auth-intro { padding-block: var(--space-6); }
.auth-panel { padding: clamp(var(--space-6), 4vw, var(--space-12)); border: 1px solid var(--border); background: var(--card); border-radius: 1.5rem; box-shadow: var(--panel-shadow); }
.eyebrow { margin: 0; font-size: var(--type-supporting-size); letter-spacing: .12em; font-weight: 700; color: var(--muted-foreground); }
.brand-label { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-full); background: var(--card); color: var(--brand-deep); letter-spacing: .02em; }
.brand-label span { inline-size: .4rem; block-size: .4rem; border-radius: 50%; background: var(--brand-green); }
h1, h2 { margin: 0; font-weight: 750; }
.auth-intro h1 { font-size: clamp(2.75rem, 6.5vw, 5rem); font-weight: 900; letter-spacing: -.06em; line-height: .99; margin: var(--space-6) 0; }
.auth-intro h1 span { color: var(--brand); }
.auth-intro p:not(.eyebrow) { font-size: var(--type-subheading-size); max-width: 35ch; color: var(--muted-foreground); }
h2 { font-size: var(--type-section-size); line-height: var(--type-section-leading); }
.folder-symbol { display: inline-block; position: relative; background: var(--muted-foreground); width: 1rem; height: .72rem; border-radius: 2px; flex: none; }
.folder-symbol::before { content: ''; position: absolute; background: inherit; width: .48rem; height: .23rem; top: -.17rem; border-radius: 2px 2px 0 0; }
.empty .folder-symbol { transform: scale(2.3); }
form { display: grid; gap: var(--space-2); }
.auth-panel form { margin-top: var(--space-6); }
.auth-fields { display: grid; gap: var(--space-2); border: 0; min-inline-size: 0; padding: 0; margin: 0; }
.auth-fields .text-button { justify-self: start; }
form label { font-weight: 650; }
input:not([type="radio"]), select { min-width: 0; min-height: 44px; color: var(--foreground); background: var(--background); border: 1px solid var(--input); border-radius: var(--radius-md); padding: var(--space-2) var(--space-3); }
form input + label, form .hint + label { margin-top: var(--space-3); }
.hint { margin: 0; font-size: var(--type-supporting-size); }
.status { min-height: 1.3em; margin: var(--space-2) 0; overflow-wrap: anywhere; }
.switch { margin: var(--space-4) 0 0; }
.text-button, .crumb, .item-name { border: 0; background: none; color: inherit; cursor: pointer; font-weight: 650; min-height: 44px; text-align: start; padding: 0; overflow-wrap: anywhere; }
.text-button { color: var(--brand-deep); text-decoration: underline; text-underline-offset: .18em; }
.workspace { min-height: calc(100vh - 7rem); display: grid; grid-template-columns: minmax(10rem, 13rem) minmax(0, 1fr); margin: var(--space-6) var(--layout-page-gutter) var(--space-4); gap: var(--space-3); }
.sidebar { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6) var(--space-4); background: var(--card); border: 1px solid var(--border); border-radius: 1.15rem; }
.nav-file { border: 1px solid var(--border); border-radius: var(--radius-lg); width: 100%; min-height: 44px; background: var(--brand-tint); color: var(--brand-deep); padding: var(--space-3); display: flex; align-items: center; gap: var(--space-3); cursor: pointer; font-weight: 700; }
.nav-file .folder-symbol { background: currentColor; }
.identity { margin-top: auto; display: flex; gap: var(--space-3); align-items: center; overflow-wrap: anywhere; }
.identity small { display: block; }
.files { padding: clamp(var(--space-2), 2vw, var(--space-8)); min-width: 0; }
.files-head, .library-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-4); }
.files-head { margin-bottom: var(--space-6); }
.files-head h1 { font-size: var(--type-title-size); font-weight: 850; letter-spacing: -.04em; line-height: var(--type-title-leading); overflow-wrap: anywhere; }
.breadcrumbs { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.library { background: var(--card); border: 1px solid var(--border); border-radius: 1rem; box-shadow: 0 4px 20px #30203008; }
.library-toolbar { padding: var(--space-3); border-bottom: 1px solid var(--border); }
.search { flex: 1 1 12rem; }
.search input { width: 100%; max-width: 24rem; }
.sort { display: flex; align-items: center; gap: var(--space-2); }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th, td { padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--border); text-align: start; overflow-wrap: anywhere; }
th { color: var(--muted-foreground); font-size: var(--type-supporting-size); }
th:nth-child(2) { width: 5rem; } th:nth-child(3) { width: 8rem; } th:last-child { width: 8rem; }
tbody tr:last-child td { border-bottom: 0; }
.item { display: flex; align-items: center; gap: var(--space-3); }
.file-symbol { flex: none; width: .75rem; height: 1rem; border: 1px solid var(--muted-foreground); border-radius: 2px; }
.empty { min-height: 17rem; display: grid; place-content: center; justify-items: center; gap: var(--space-3); padding: var(--space-8); text-align: center; }
.empty .folder-symbol { margin: var(--space-4); }
.empty p { margin: 0; }
dialog { width: min(28rem, calc(100% - var(--space-8))); background: var(--card); color: var(--foreground); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: var(--space-6); }
dialog::backdrop { background: oklch(0 0 0 / 50%); }
dialog h2 { margin-bottom: var(--space-4); }
dialog .actions { justify-content: end; }
@media (max-width: 751px) {
  .auth, .workspace { grid-template-columns: minmax(0, 1fr); }
  .auth { gap: var(--space-3); margin-block: var(--space-6); }
  .auth-intro { padding-block: var(--space-3); }
  .sidebar .eyebrow, .identity, .date-col, .size-col { display: none; }
  .sidebar { padding: var(--space-2); }
  .nav-file { width: auto; }
  th:last-child { width: 6.5rem; }
}
@media (forced-colors: active) { :focus-visible { outline-color: Highlight; } }
