/* Atlandrak design tokens. Light is the default; dark applies when the user picks it
   or when the user follows the device and the device is dark. */
:root {
  --bg: #f7f4ee;
  --surface: #fffdf9;
  --surface-2: #efeae0;
  --hover: #e8e2d6;
  --selected: #efe3c8;
  --selected-text: #5e4517;
  --text: #1a1814;
  --text-2: #5e584d;
  --text-3: #8a8478;
  --border: #e2dccf;
  --accent: #8a6a2b;
  --accent-hover: #735823;
  --on-accent: #ffffff;
  --brand-a: #7a5a1f;
  --brand-b: #b38a3f;
  --brand-c: #d9b878;
  --danger: #b3261e;
  --shadow: 0 1px 2px rgba(26, 22, 14, .08), 0 6px 20px rgba(26, 22, 14, .08);
  --radius: 12px;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-brand: "Sora", "Inter", system-ui, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e0e0f;
  --surface: #17171a;
  --surface-2: #212125;
  --hover: #2a2a2f;
  --selected: #3a3122;
  --selected-text: #f1d99f;
  --text: #efece6;
  --text-2: #aaa59b;
  --text-3: #7d786f;
  --border: #2e2d30;
  --accent: #d8b46a;
  --accent-hover: #e6c584;
  --on-accent: #1a1408;
  --brand-a: #b8913f;
  --brand-b: #d8b46a;
  --brand-c: #f3dfa8;
  --danger: #ff7b72;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --bg: #0e0e0f;
    --surface: #17171a;
    --surface-2: #212125;
    --hover: #2a2a2f;
    --selected: #3a3122;
    --selected-text: #f1d99f;
    --text: #efece6;
    --text-2: #aaa59b;
    --text-3: #7d786f;
    --border: #2e2d30;
    --accent: #d8b46a;
    --accent-hover: #e6c584;
    --on-accent: #1a1408;
    --brand-a: #b8913f;
    --brand-b: #d8b46a;
    --brand-c: #f3dfa8;
    --danger: #ff7b72;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font-ui); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-brand); font-weight: 700; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; margin-top: 24px; color: var(--text-2); }
.muted { color: var(--text-2); }
.icon { flex: none; }

/* Brand */
.logo {
  font-family: var(--font-brand);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(100deg, var(--brand-a) 0%, var(--brand-c) 45%, var(--brand-b) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo-sm { font-size: 22px; }
.logo-md { font-size: 30px; }
.logo-hero { font-size: clamp(56px, 12vw, 128px); line-height: 1; }

/* Top bar */
.topbar {
  height: 64px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px 0 20px; position: sticky; top: 0; z-index: 20; background: var(--bg);
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.product-name { font-family: var(--font-brand); font-weight: 600; font-size: 20px; color: var(--text-2); }
.topbar-actions { position: relative; display: flex; align-items: center; gap: 6px; }
.icon-btn, .avatar-btn {
  border: 0; background: transparent; color: var(--text-2); cursor: pointer;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
}
.icon-btn:hover, .avatar-btn:hover { background: var(--hover); }
.avatar, .avatar-lg, .avatar-xl { border-radius: 50%; object-fit: cover; display: grid; place-items: center; }
.avatar { width: 34px; height: 34px; }
.avatar-lg { width: 80px; height: 80px; font-size: 30px; }
.avatar-xl { width: 112px; height: 112px; font-size: 42px; }
.avatar-initials { background: linear-gradient(135deg, var(--brand-a), var(--brand-b)); color: #fff; font-weight: 500; }

.popover {
  position: absolute; top: 52px; right: 0; display: none; z-index: 30;
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow);
}
.popover.open { display: block; animation: pop .14s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.profile-pop { width: 340px; padding: 24px 20px 16px; text-align: center; }
.profile-pop .avatar-lg { margin: 0 auto 12px; }
.profile-name { font-size: 20px; font-weight: 500; }
.profile-email { color: var(--text-2); margin-bottom: 18px; word-break: break-all; }
.pill-btn {
  display: inline-block; padding: 9px 22px; border: 1px solid var(--border); border-radius: 999px;
  color: var(--accent); font-weight: 500;
}
.pill-btn:hover { background: var(--hover); }
.text-btn { display: block; margin: 16px -20px -16px; padding: 14px; border-top: 1px solid var(--border); color: var(--text-2); border-radius: 0 0 24px 24px; }
.text-btn:hover { background: var(--hover); color: var(--text); }
.apps-pop { width: 300px; padding: 16px; display: none; grid-template-columns: repeat(3, 1fr); gap: 4px; right: 48px; }
.apps-pop.open { display: grid; }
.app-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 16px; color: var(--text); font-size: 13px; }
.app-tile .icon { color: var(--accent); }
.app-tile:hover { background: var(--hover); }

.signin-btn {
  background: var(--accent); color: var(--on-accent); padding: 9px 24px; border-radius: 999px; font-weight: 500;
  transition: background .15s, box-shadow .15s;
}
.signin-btn:hover { background: var(--accent-hover); box-shadow: var(--shadow); }

/* Landing and login */
body.landing, body.login { overflow: hidden; height: 100vh; height: 100dvh; }
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora span {
  position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%; filter: blur(90px); opacity: .28;
  animation: drift 26s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { background: var(--brand-a); top: -20vmax; left: -12vmax; }
.aurora span:nth-child(2) { background: var(--brand-b); bottom: -26vmax; right: -14vmax; animation-delay: -8s; }
.aurora span:nth-child(3) { background: var(--brand-c); top: 30%; left: 45%; width: 35vmax; height: 35vmax; opacity: .18; animation-delay: -16s; }
@keyframes drift { to { transform: translate(6vmax, 4vmax) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .aurora span { animation: none; } }
.landing-top { position: relative; z-index: 2; display: flex; justify-content: flex-end; align-items: center; padding: 14px 20px; height: 68px; }
.landing-center { position: relative; z-index: 1; height: calc(100vh - 68px); height: calc(100dvh - 68px); display: grid; place-items: center; padding-bottom: 12vh; }

.login { display: grid; place-items: center; }
.login-card {
  position: relative; z-index: 1; width: min(440px, calc(100vw - 32px)); background: var(--surface);
  border: 1px solid var(--border); border-radius: 28px; padding: 44px 40px 40px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px;
}
.login-card h1 { font-size: 30px; margin-top: 18px; }
.google-btn {
  margin-top: 26px; display: flex; align-items: center; justify-content: center; gap: 12px;
  height: 46px; border: 1px solid var(--border); border-radius: 999px; font-weight: 500; background: var(--surface);
}
.google-btn:hover { background: var(--hover); }

/* App shell */
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: calc(100vh - 64px); }
.sidebar { padding: 8px 12px 16px 8px; display: flex; flex-direction: column; gap: 2px; }
.content {
  background: var(--surface); border-radius: 18px 0 0 0; padding: 20px 28px 40px; min-height: calc(100vh - 64px);
  margin-right: 0;
}
.nav-item {
  display: flex; align-items: center; gap: 14px; height: 36px; padding: 0 16px; border-radius: 999px; color: var(--text);
}
.nav-item:hover { background: var(--hover); }
.nav-item.active { background: var(--selected); color: var(--selected-text); font-weight: 500; }
.new-btn {
  display: inline-flex; align-items: center; gap: 12px; height: 56px; padding: 0 22px 0 16px; margin: 0 0 14px 4px;
  width: fit-content; border: 0; border-radius: 16px; background: var(--surface); color: var(--text); font: 500 14px var(--font-ui);
  box-shadow: var(--shadow); cursor: pointer;
}
.new-btn:hover { background: var(--hover); }
.page-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 18px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.content .card { background: var(--bg); }

/* Account */
.account-hero { text-align: center; padding: 18px 0 28px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.photo-edit { position: relative; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; margin-bottom: 8px; }
.photo-badge {
  position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 999px; padding: 2px 12px; font-size: 12px; box-shadow: var(--shadow);
}
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.field input, .field select {
  height: 44px; padding: 0 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  color: var(--text); font: 14px var(--font-ui);
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.field input:disabled { color: var(--text-3); background: var(--surface-2); }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-top: 24px; }
.primary-btn {
  background: var(--accent); color: var(--on-accent); border: 0; border-radius: 999px; padding: 10px 28px;
  font: 500 14px var(--font-ui); cursor: pointer;
}
.primary-btn:hover { background: var(--accent-hover); }
.status { color: var(--text-2); font-size: 13px; }
.theme-options { display: flex; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.theme-option { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.theme-option input { position: absolute; opacity: 0; }
.theme-swatch { width: 120px; height: 76px; border-radius: 12px; border: 2px solid var(--border); }
.theme-option input:checked + .theme-swatch { border-color: var(--accent); box-shadow: 0 0 0 3px var(--selected); }
.theme-option input:focus-visible + .theme-swatch { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-light { background: linear-gradient(180deg, #f7f4ee 30%, #fffdf9 30%); }
.theme-dark { background: linear-gradient(180deg, #0e0e0f 30%, #17171a 30%); }
.theme-system { background: linear-gradient(90deg, #f7f4ee 50%, #0e0e0f 50%); }

/* Vault */
.dropzone { position: relative; min-height: 60vh; border-radius: var(--radius); }
.drop-hint {
  display: none; position: absolute; inset: 0; border: 2px dashed var(--accent); border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent);
  flex-direction: column; align-items: center; justify-content: center; gap: 10px; font-weight: 500;
}
.dropzone.dragging .drop-hint { display: flex; }
.file-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 180px 100px 88px; align-items: center; gap: 12px;
  height: 48px; padding: 0 12px; border-bottom: 1px solid var(--border);
}
.file-row.head { color: var(--text-2); font-weight: 500; height: 40px; }
.file-row:not(.head):hover { background: var(--hover); border-radius: 8px; }
.file-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.file-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-name .icon { color: var(--accent); }
.file-meta { color: var(--text-2); }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; }
.row-actions button { width: 36px; height: 36px; }
.empty { padding: 60px 0; text-align: center; }
.toast {
  position: fixed; left: 24px; bottom: 24px; background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 10px;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: all .2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: none; }

/* Productivity */
.building { text-align: center; padding: 64px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--accent); }
.building h2 { color: var(--text); }

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; overflow-x: auto; padding: 0 12px 8px; }
  .new-btn { height: 40px; margin: 0; }
  .content { border-radius: 18px 18px 0 0; padding: 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .file-row { grid-template-columns: minmax(0, 1fr) 88px; }
  .file-row > :nth-child(2), .file-row > :nth-child(3) { display: none; }
  .profile-pop { width: min(340px, calc(100vw - 32px)); }
  .login-card { padding: 32px 24px; }
}

/* Device support: notches, touch, tablets and large screens (TV). */
.topbar, .landing-top { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
button, a, input, select { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.apps-pop { width: min(300px, calc(100vw - 32px)); }
@media (hover: none) {
  .icon-btn:hover, .avatar-btn:hover, .nav-item:hover, .file-row:not(.head):hover { background: transparent; }
  .nav-item.active:hover { background: var(--selected); }
}
@media (pointer: coarse) {
  .nav-item { height: 44px; }
  .file-row { height: 56px; }
  .row-actions button { width: 44px; height: 44px; }
}
@media (max-width: 760px) {
  .field input, .field select { font-size: 16px; }
  .apps-pop { right: -44px; }
  .toast { left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .shell { grid-template-columns: 200px minmax(0, 1fr); }
  .content { padding: 20px; }
}
@media (min-width: 1800px) { body { zoom: 1.25; } }
@media (min-width: 2600px) { body { zoom: 1.75; } }

/* Landing footer and legal pages */
.landing-footer { position: fixed; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 24px; padding: 16px 16px max(16px, env(safe-area-inset-bottom)); font-size: 13px; }
.landing-footer a { color: var(--text-2); }
.landing-footer a:hover { color: var(--text); }
.legal-page { max-width: 720px; margin: 0 auto; padding: 40px 20px 80px; line-height: 1.7; }
.legal-page h1 { font-size: 32px; margin: 28px 0 4px; }
.legal-page h2 { margin: 28px 0 8px; }
.legal-page a:not(.logo) { color: var(--accent); }

/* Tasks */
.primary-btn { display: inline-flex; align-items: center; gap: 8px; }
.task-toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.segmented { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.segmented button { border: 0; background: transparent; color: var(--text-2); padding: 6px 14px; border-radius: 999px; font: 500 13px var(--font-ui); cursor: pointer; }
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.task-table { overflow-x: auto; }
.task-row { display: grid; grid-template-columns: minmax(220px, 1fr) 140px 110px 150px 170px 170px; gap: 8px; align-items: center; min-width: 1000px; padding: 4px 8px; border-bottom: 1px solid var(--border); }
.task-row.head { color: var(--text-2); font-weight: 500; font-size: 13px; padding: 10px 8px; }
.task-row input, .task-row select { width: 100%; height: 34px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text); font: 14px var(--font-ui); padding: 0 8px; }
.task-row input:hover:not(:disabled), .task-row select:hover:not(:disabled) { border-color: var(--border); }
.task-row input:focus, .task-row select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.task-row :disabled { color: var(--text); opacity: 1; cursor: default; }
.pill-select { font-weight: 500; }
.status-not-started { color: var(--text-2); }
.status-in-progress { color: #c27c0e; }
.status-done { color: #1f9d55; }
.priority-high { color: var(--danger); }
.priority-medium { color: #c27c0e; }
.priority-low { color: var(--text-2); }
.link-btn { border: 0; background: transparent; text-align: left; cursor: pointer; padding: 0 8px; height: 34px; border-radius: 8px; font: 14px var(--font-ui); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-btn:hover { background: var(--hover); }
.add-row { border: 0; background: transparent; color: var(--text-2); padding: 10px 8px; cursor: pointer; font: 14px var(--font-ui); text-align: left; width: 100%; border-radius: 8px; }
.add-row:hover { background: var(--hover); color: var(--text); }
.board { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 16px; overflow-x: auto; }
.board-col { background: var(--bg); border-radius: var(--radius); padding: 10px; min-height: 200px; }
.board-col header { display: flex; align-items: center; gap: 8px; font-weight: 500; padding: 4px 6px 10px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.board-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.board-card:hover { box-shadow: var(--shadow); }
.card-title { font-weight: 500; }
.card-meta { display: flex; gap: 8px; align-items: center; font-size: 12px; }
.tag { font-weight: 500; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow); z-index: 40; padding: 16px 20px max(20px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.drawer-head .icon-btn { font-size: 24px; }
.drawer-title { font: 500 22px var(--font-ui); border: 0; background: transparent; color: var(--text); padding: 4px 0; }
.drawer-title:focus { outline: none; }
.drawer textarea { min-height: 90px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: 14px/1.5 var(--font-ui); resize: vertical; }
.danger-btn { align-self: flex-start; border: 1px solid var(--border); background: transparent; color: var(--danger); padding: 8px 18px; border-radius: 999px; font: 500 14px var(--font-ui); cursor: pointer; }
@media (max-width: 760px) {
  .board { grid-template-columns: repeat(3, 85vw); }
  .drawer textarea, .drawer input, .drawer select { font-size: 16px; }
  .page-head { gap: 12px; }
}
.rename-input { flex: 1; min-width: 0; height: 32px; padding: 0 10px; border: 1px solid var(--accent); border-radius: 8px; background: var(--surface); color: var(--text); font: 14px var(--font-ui); }
.file-row { grid-template-columns: minmax(0, 1fr) 180px 100px 132px; }
@media (max-width: 760px) { .file-row { grid-template-columns: minmax(0, 1fr) 132px; } .rename-input { font-size: 16px; } }

/* Workspace (Notion style) */
.ws-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; }
.ws-list { border-right: 1px solid var(--border); padding-right: 12px; display: flex; flex-direction: column; gap: 2px; }
.ws-list-head { display: flex; justify-content: space-between; align-items: center; color: var(--text-2); font-size: 13px; font-weight: 500; padding: 4px 4px 8px 10px; }
.ws-list-head .icon-btn { width: 32px; height: 32px; font-size: 20px; }
.ws-list-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--text); text-align: left; padding: 8px 10px; border-radius: 8px; cursor: pointer; font: 14px var(--font-ui); }
.ws-list-item:hover { background: var(--hover); }
.ws-list-item.active { background: var(--selected); color: var(--selected-text); font-weight: 500; }
.ws-list-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-list-empty { padding: 0 10px; font-size: 13px; }
.ws-role { font-size: 11px; color: var(--text-2); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.ws-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ws-db-icon { width: 48px; height: 48px; font-size: 28px; text-align: center; border: 0; border-radius: 10px; background: transparent; color: var(--text); }
.ws-db-icon:hover:not(:disabled) { background: var(--hover); }
.ws-db-name { flex: 1; min-width: 0; font: 600 28px var(--font-ui); border: 0; background: transparent; color: var(--text); padding: 4px 0; }
.ws-db-name:focus, .ws-db-icon:focus { outline: none; }
.ws-db-name:disabled, .ws-db-icon:disabled { color: var(--text); opacity: 1; }
.text-link { border: 0; background: transparent; color: var(--text-2); font: 13px var(--font-ui); cursor: pointer; margin-left: auto; }
.text-link:hover { color: var(--danger); }
.ws-table { overflow-x: auto; border-top: 1px solid var(--border); }
.ws-tr { display: grid; grid-template-columns: var(--cols); align-items: center; min-width: max-content; border-bottom: 1px solid var(--border); }
.ws-th { color: var(--text-2); font-size: 13px; }
.ws-th > span { padding: 10px 8px; }
.ws-th-btn { display: flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--text-2); font: 500 13px var(--font-ui); padding: 10px 8px; text-align: left; cursor: pointer; border-left: 1px solid var(--border); }
.ws-th-btn:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.ws-th-btn:disabled { cursor: default; }
.ws-type { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.ws-badge { font-size: 10px; border: 1px solid var(--border); border-radius: 999px; padding: 0 6px; }
.ws-td { border-left: 1px solid var(--border); min-height: 40px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 2px 4px; }
.ws-input { width: 100%; min-width: 0; height: 34px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text); font: 14px var(--font-ui); padding: 0 8px; }
.ws-input:hover:not(:disabled) { border-color: var(--border); }
.ws-input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.ws-input:disabled { opacity: 1; color: var(--text); }
.ws-title { font-weight: 500; }
.ws-check { width: 18px; height: 18px; margin: 0 8px; accent-color: var(--accent); }
.ws-tag, .ws-person { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); margin: 2px 2px 2px 0; }
.ws-person { border-radius: 999px; }
.ws-link { color: var(--accent); word-break: break-all; }
.ws-open { width: 36px; height: 36px; font-size: 16px; }
.ws-choices { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 4px 0; }
.ws-choices label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); cursor: pointer; }
.ws-choices input { accent-color: var(--accent); width: 16px; height: 16px; }
.ws-props { display: flex; flex-direction: column; gap: 4px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.ws-prop-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 36px; }
.ws-prop-name { color: var(--text-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.ws-page { width: min(640px, 100vw); }
.ws-body { display: flex; flex-direction: column; gap: 2px; }
.ws-block { display: flex; align-items: flex-start; gap: 6px; }
.ws-block-type { width: 22px; height: 28px; opacity: .35; border: 0; background: transparent; color: var(--text); cursor: pointer; flex: none; }
.ws-block:hover .ws-block-type, .ws-block-type:focus { opacity: 1; width: auto; }
.ws-block textarea { flex: 1; border: 0; background: transparent; color: var(--text); font: 15px/1.6 var(--font-ui); resize: none; padding: 3px 0; overflow: hidden; }
.ws-block textarea:focus { outline: none; }
.ws-block-h1 textarea { font-size: 26px; font-weight: 600; }
.ws-block-h2 textarea { font-size: 21px; font-weight: 600; }
.ws-block-h3 textarea { font-size: 17px; font-weight: 600; }
.ws-block-bullet textarea { padding-left: 18px; background: radial-gradient(circle at 6px 15px, var(--text) 2.5px, transparent 3px) no-repeat; }
.ws-block-quote textarea { border-left: 3px solid var(--text); padding-left: 12px; }
.ws-todo { margin-top: 8px; accent-color: var(--accent); }
.ws-hint { font-size: 12px; }
.ws-share-form { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; gap: 8px; }
.ws-share-form .ws-input { border-color: var(--border); }
.ws-roles { font-size: 13px; padding-left: 18px; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.ws-members { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.ws-member { display: grid; grid-template-columns: minmax(0, 1fr) 130px 36px; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; word-break: break-all; }
.ws-member .ws-input { border-color: var(--border); }
.ws-stack { display: flex; flex-direction: column; gap: 14px; }
.drawer .field input, .drawer .field select { height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: 14px var(--font-ui); }
.drawer .field textarea { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: 14px var(--font-ui); }
.board-card .card-meta { justify-content: space-between; }
@media (max-width: 900px) {
  .ws-layout { grid-template-columns: 1fr; }
  .ws-list { border-right: 0; border-bottom: 1px solid var(--border); padding: 0 0 10px; flex-direction: row; overflow-x: auto; }
  .ws-list-head span { display: none; }
  .ws-list-item { white-space: nowrap; }
  .ws-db-name { font-size: 22px; }
  .ws-share-form { grid-template-columns: 1fr; }
  .ws-input, .ws-block textarea { font-size: 16px; }
}

/* Vault v2 */
.sidebar { position: relative; }
.new-pop { top: 64px; left: 4px; right: auto; width: 220px; padding: 6px; border-radius: 14px; }
.new-pop button, .item-menu button { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: transparent; color: var(--text); padding: 10px 12px; border-radius: 8px; font: 14px var(--font-ui); cursor: pointer; text-align: left; }
.new-pop button:hover, .item-menu button:hover { background: var(--hover); }
.storage-mini { margin: 18px 8px 0 16px; display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.storage-mini .pill-btn { align-self: flex-start; font-size: 13px; padding: 6px 14px; }
.meter { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.meter span.full { background: var(--danger); }
.meter-lg { height: 10px; margin: 12px 0; }
.vault-top { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.vault-search { flex: 1; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.vault-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: 15px var(--font-ui); outline: none; }
.segmented button .icon { display: block; }
.crumbs { font-size: 22px; }
.crumbs a:hover { text-decoration: underline; }
.trash-note { margin: -8px 0 14px; font-size: 13px; }
.file-row { position: relative; cursor: default; }
.file-row[data-folder], .vault-card { cursor: pointer; }
.file-thumb { width: 28px; height: 28px; display: grid; place-items: center; color: var(--accent); flex: none; }
.file-thumb img { width: 28px; height: 28px; object-fit: cover; border-radius: 6px; }
.row-actions { position: relative; }
.item-menu { position: absolute; right: 0; top: 40px; z-index: 30; min-width: 200px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.vault-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.vault-card { position: relative; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; overflow: visible; }
.vault-card:hover { box-shadow: var(--shadow); }
.vault-card-media { height: 160px; display: grid; place-items: center; color: var(--accent); border-radius: 13px 13px 0 0; overflow: hidden; background: var(--surface-2); }
.vault-card-media .icon { width: 48px; height: 48px; }
.vault-card-media.is-image img { width: 100%; height: 100%; object-fit: contain; background: var(--surface-2); }
.vault-card-foot { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 4px 6px 12px; font-size: 14px; }
.vault-card-foot > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .45); display: grid; place-items: center; padding: 16px; }
.modal { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.picker-crumbs { font-size: 14px; color: var(--text-2); }
.picker-crumbs button { border: 0; background: transparent; color: var(--accent); font: 14px var(--font-ui); cursor: pointer; padding: 2px; }
.picker-list { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; padding: 6px; }
.picker-item { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--text); padding: 10px; border-radius: 8px; font: 14px var(--font-ui); cursor: pointer; text-align: left; }
.picker-item:hover { background: var(--hover); }
.picker-item .icon { color: var(--accent); }
.storage-card { max-width: 720px; }
.storage-big { font-size: 18px; }
.storage-big strong { font-family: var(--font-brand); font-size: 28px; }
.plans-title { margin: 8px 0 14px; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.plan { border: 1px solid var(--border); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; background: var(--bg); }
.plan.current { border-color: var(--accent); }
.plan-size { font-family: var(--font-brand); font-weight: 700; font-size: 22px; }
.plan-price { font-size: 18px; font-weight: 600; }
.plan-price span { font-size: 13px; font-weight: 400; }
#toast a { color: inherit; text-decoration: underline; }
@media (max-width: 760px) {
  .vault-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vault-card-media { height: 120px; }
  .vault-search input { font-size: 16px; }
  .storage-mini { display: none; }
}

/* Footer, ads and internal */
.site-footer { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; padding: 40px 16px 24px; font-size: 13px; }
.site-footer a, .landing-footer a { color: var(--text-2); }
.site-footer a:hover, .landing-footer a:hover { color: var(--text); text-decoration: underline; }
.shell.with-ads { grid-template-columns: 256px minmax(0, 1fr) 200px; }
.ad-column { padding: 8px 12px; display: flex; flex-direction: column; gap: 16px; }
.ad-slot { min-height: 250px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; position: relative; background: var(--surface); }
.ad-label { position: absolute; top: 4px; left: 8px; font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.legal .ad-column { max-width: 728px; margin: 0 auto 24px; padding: 0 16px; }
.update { border-top: 1px solid var(--border); padding: 18px 0; }
.update h2 { margin: 6px 0; }
.update-tech { font-size: 13px; }
.internal-hero { text-align: center; }
.internal-hero p { margin-top: 12px; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }
@media (max-width: 1100px) { .shell.with-ads { grid-template-columns: 200px minmax(0, 1fr); } .shell.with-ads .ad-column { display: none; } }
@media (max-width: 760px) { .shell.with-ads { grid-template-columns: 1fr; } }

/* AI */
.ai-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); }
.ai-bar strong { font-family: var(--font-brand); font-size: 18px; }
.ai-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.ai-card { display: flex; flex-direction: column; text-align: left; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); color: var(--text); padding: 0; overflow: hidden; cursor: pointer; font: 14px var(--font-ui); }
.ai-card:hover { box-shadow: var(--shadow); border-color: var(--accent); }
.ai-thumb { height: 150px; background: var(--surface-2); }
.ai-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ai-card-body { display: flex; flex-direction: column; gap: 4px; padding: 12px; }
.ai-card-body .muted { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-price { color: var(--accent); font-weight: 600; font-size: 13px; }
.ai-run { width: min(620px, 100%); }
.ai-desc { font-size: 13px; max-height: 80px; overflow: auto; }
.ai-run textarea { padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: 15px var(--font-ui); resize: vertical; }
.ai-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.ai-result { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--bg); }
.ai-media img, .ai-media video { width: 100%; display: block; background: var(--surface-2); }
.ai-status { height: 200px; display: grid; place-items: center; text-align: center; padding: 16px; color: var(--text-2); background: var(--surface-2); }
.ai-status.failed { color: var(--danger); }
.ai-meta { padding: 12px; font-size: 13px; }
.ai-meta p { margin: 6px 0; }
@media (max-width: 760px) { .ai-run textarea { font-size: 16px; } .ai-bar { flex-direction: column; align-items: flex-start; } }
.key-new { display: flex; gap: 10px; margin: 14px 0; }
.key-new input { flex: 1; height: 42px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: 14px var(--font-ui); }
.key-reveal { border: 1px solid var(--accent); border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; word-break: break-all; }
.key-reveal code { font-size: 13px; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.key-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }

/* Sync */
.chat-list { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.chat-item { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--text); padding: 8px 12px; border-radius: 999px; cursor: pointer; font: 14px var(--font-ui); text-align: left; }
.chat-item:hover { background: var(--hover); }
.chat-item.active { background: var(--selected); color: var(--selected-text); font-weight: 500; }
.chat-avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--accent); flex: none; }
.chat-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-unread { background: var(--accent); color: var(--on-accent); border-radius: 999px; font-size: 11px; padding: 1px 7px; font-weight: 600; }
.chat-empty { padding: 0 12px; font-size: 13px; }
#sync-app { display: flex; flex-direction: column; height: calc(100vh - 140px); height: calc(100dvh - 140px); }
.chat-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.chat-head h1 { font-size: 20px; }
.chat-add { margin-left: auto; display: flex; gap: 8px; }
.chat-add input { height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: 13px var(--font-ui); }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px 4px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: min(560px, 85%); align-self: flex-start; }
.msg.mine { align-self: flex-end; text-align: right; }
.msg-meta { font-size: 11px; color: var(--text-3); margin-bottom: 2px; }
.msg-body { display: inline-block; text-align: left; padding: 9px 14px; border-radius: 16px; background: var(--surface-2); line-height: 1.45; word-break: break-word; }
.msg.mine .msg-body { background: var(--selected); color: var(--selected-text); }
.chat-compose { display: flex; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.chat-compose textarea { flex: 1; resize: none; padding: 11px 14px; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); color: var(--text); font: 15px var(--font-ui); max-height: 160px; }
.chat-new { max-width: 520px; display: flex; flex-direction: column; gap: 14px; }
.chat-new .field input { height: 42px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: 14px var(--font-ui); }
@media (max-width: 760px) { .chat-compose textarea, .chat-add input { font-size: 16px; } #sync-app { height: calc(100dvh - 220px); } }

/* Mail */
.mail-list { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.mail-row { display: grid; grid-template-columns: 220px minmax(0, 1fr) 80px; gap: 12px; align-items: center; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); padding: 12px 10px; text-align: left; cursor: pointer; font: 14px var(--font-ui); }
.mail-row:hover { background: var(--hover); }
.mail-row.unread { font-weight: 600; }
.mail-from, .mail-subject { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-date { text-align: right; font-size: 12px; }
.mail-read h1 { margin: 16px 0 8px; font-size: 22px; }
.mail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mail-head { display: flex; flex-direction: column; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
.mail-frame { width: 100%; min-height: 60vh; border: 1px solid var(--border); border-radius: 12px; margin-top: 12px; background: #fff; }
.mail-text { white-space: pre-wrap; font: 14px/1.6 var(--font-ui); margin-top: 12px; }
.mail-compose { width: min(640px, 100%); }
.mail-compose input, .mail-compose textarea { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: 14px var(--font-ui); }
@media (max-width: 760px) { .mail-row { grid-template-columns: minmax(0, 1fr) 60px; } .mail-from { grid-column: 1 / -1; } .mail-compose input, .mail-compose textarea { font-size: 16px; } }

/* Vault selection */
.file-row.selected, .vault-card.selected { background: var(--selected); color: var(--selected-text); border-radius: 8px; }
.vault-card.selected { outline: 2px solid var(--accent); }
.file-row, .vault-card { user-select: none; -webkit-user-select: none; }
.select-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 12px; border-radius: 14px; background: var(--surface-2); }
.select-bar strong { margin-right: 6px; }
.marquee { position: fixed; z-index: 70; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); pointer-events: none; border-radius: 4px; }
.help-btn { white-space: nowrap; }
#vault-app { min-height: 70vh; }

.price-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.price-table th, .price-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
.landing-footer { gap: 18px; flex-wrap: wrap; }

.help-link { font: 700 18px var(--font-brand); color: var(--text-2); }
.help-article { max-width: 820px; line-height: 1.7; }
.help-article h3 { margin-top: 24px; color: var(--text); }
.help-grid .plan { text-decoration: none; }
.help-grid .plan:hover { border-color: var(--accent); }

.topbar-right { display: flex; align-items: center; gap: 6px; }
.select-bar .pill-btn { color: var(--text); background: var(--surface); }

.lang-select { margin-top: 14px; height: 44px; min-width: 240px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: 14px var(--font-ui); }
[dir="rtl"] .sidebar, [dir="rtl"] .content { text-align: right; }

/* Vault space: ring + tier list (our own layout). */
.space-layout { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 32px; align-items: start; max-width: 980px; }
@media (max-width: 760px) { .space-layout { grid-template-columns: 1fr; } }
.space-ring { position: relative; text-align: center; padding: 8px; }
.space-ring svg { width: 220px; height: 220px; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--border); stroke-width: 10; }
.ring-fill { fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.ring-fill.full { stroke: #c4553d; }
.ring-label { position: absolute; top: 8px; left: 0; right: 0; height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.ring-label strong { font-family: var(--font-brand); font-weight: 800; font-size: 40px; }
.space-tiers h1 { margin: 0 0 16px; }
.tier-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.tier { display: grid; grid-template-columns: 1fr auto 110px; align-items: center; gap: 16px; padding: 16px 4px; border-bottom: 1px solid var(--border); }
.tier.current .tier-size { color: var(--accent); }
.tier-size { font-family: var(--font-brand); font-weight: 700; font-size: 20px; }
.tier-price { font-weight: 600; }
.tier-action { text-align: end; }
.tier-badge { display: inline-block; padding: 4px 12px; border: 1px solid var(--accent); color: var(--accent); border-radius: 6px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.text-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.update-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.update-list li { display: flex; gap: 10px; align-items: baseline; }
.update-tag { flex: none; min-width: 74px; text-align: center; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--border); }
.tag-new { color: var(--accent); border-color: var(--accent); }
.ai-kind { display: flex; align-items: center; justify-content: center; height: 100%; font-family: var(--font-brand); font-weight: 700; color: var(--accent); font-size: 15px; letter-spacing: .02em; }
.ai-tabs { margin: 6px 0 14px; }
.ai-inputs { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ai-input { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.ai-input img { width: 100%; height: 100%; object-fit: cover; }
.ai-input button { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; }
.ai-quote strong { font-family: var(--font-brand); font-size: 20px; }
.ai-run pre { white-space: pre-wrap; word-break: break-all; font-size: 12px; }
/* Vault: details column, invitations, share dialog */
.vault-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.vault-split.with-panel { grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; }
.details-panel { position: sticky; top: 0; align-self: start; height: calc(100vh - 96px); overflow-y: auto; padding: 18px 18px 24px;
  border-left: 2px solid var(--accent); background: var(--surface, var(--bg)); border-radius: 0 14px 14px 0; }
.details-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.details-head strong { font-family: var(--font-brand); font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.details-preview { margin: 14px 0; border-radius: 12px; border: 1px solid var(--border); min-height: 120px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.details-preview img { width: 100%; max-height: 220px; object-fit: contain; }
.details-preview .icon { width: 56px; height: 56px; color: var(--accent); }
.details-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.details-panel h3 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, inherit); margin: 18px 0 8px; }
.detail-row, .access-row { display: grid; grid-template-columns: 84px 1fr; gap: 10px; padding: 6px 0; font-size: 14px; word-break: break-word; }
.access-row { grid-template-columns: 1fr auto 28px; align-items: center; border-bottom: 1px solid var(--border); }
.invites { margin: 6px 0 18px; }
.invites h2 { font-size: 15px; margin: 0 0 8px; }
.invite-row { display: grid; grid-template-columns: 28px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--accent); border-radius: 12px; margin-bottom: 8px; }
.invite-card { max-width: 560px; margin: 40px auto; }
.notice { border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 10%, transparent); }
@media (max-width: 900px) {
  .vault-split.with-panel { grid-template-columns: 1fr; }
  .details-panel { position: fixed; inset: auto 0 0 0; height: 70vh; z-index: 40; border-left: 0; border-top: 2px solid var(--accent); border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.35); }
}

.plan-summary { display: flex; flex-wrap: wrap; gap: 28px; margin: 14px 0 6px; }
.plan-summary > div { display: flex; flex-direction: column; gap: 4px; }
.plan-summary strong { font-family: var(--font-brand); font-size: 18px; }
.form-actions.start { justify-content: flex-start; flex-wrap: wrap; }

.lang-picker { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 18px; font-size: 13px; }
.lang-picker a { color: var(--accent); text-decoration: none; }
.lang-picker a.active { font-weight: 700; text-decoration: underline; }
.lang-picker .unavailable { opacity: .35; cursor: default; }

/* Help: wiki layout. The footer always sits at the bottom of the page. */
.content { display: flex; flex-direction: column; }
.content > .site-footer { margin-top: auto; }
.wiki { max-width: 820px; width: 100%; }
.wiki h1 { margin: 4px 0 10px; }
.wiki-crumbs { font-size: 13px; color: var(--text-2); margin-bottom: 14px; }
.wiki-crumbs a { color: var(--accent); text-decoration: none; }
.wiki-index { margin: 26px 0 8px; }
.wiki-index h2 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); margin: 0 0 10px; }
.wiki-index ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.wiki-index li { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.wiki-index li a { font-weight: 600; color: var(--text); text-decoration: none; }
.wiki-index li a:hover { color: var(--accent); }
.wiki-index.internal h2, .wiki-nav-group.internal .wiki-nav-title { color: var(--accent); }
.wiki-nav-group { margin-bottom: 14px; }
.wiki-nav-title { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); padding: 6px 16px; }
.help-article .lang-picker { margin: 0 0 22px; }
@media (max-width: 640px) { .wiki-index li { grid-template-columns: 1fr; gap: 4px; } }

.ai-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
