/* [project]/src/styles/globals.css [app-client] (css) */
*, :before, :after, ::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: #3b82f680;
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

*, :before, :after {
  box-sizing: border-box;
  border: 0 solid #e5e7eb;
}

:before, :after {
  --tw-content: "";
}

html, :host {
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  font-feature-settings: normal;
  font-variation-settings: normal;
  -webkit-tap-highlight-color: transparent;
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.5;
}

body {
  line-height: inherit;
  margin: 0;
}

hr {
  height: 0;
  color: inherit;
  border-top-width: 1px;
}

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
  text-decoration: underline dotted;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
}

a {
  color: inherit;
  -webkit-text-decoration: inherit;
  text-decoration: inherit;
}

b, strong {
  font-weight: bolder;
}

code, kbd, samp, pre {
  font-feature-settings: normal;
  font-variation-settings: normal;
  font-family: SF Mono, JetBrains Mono, Menlo, monospace;
  font-size: 1em;
}

small {
  font-size: 80%;
}

sub, sup {
  vertical-align: baseline;
  font-size: 75%;
  line-height: 0;
  position: relative;
}

sub {
  bottom: -.25em;
}

sup {
  top: -.5em;
}

table {
  text-indent: 0;
  border-color: inherit;
  border-collapse: collapse;
}

button, input, optgroup, select, textarea {
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  font-family: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}

button, select {
  text-transform: none;
}

button, input:where([type="button"]), input:where([type="reset"]), input:where([type="submit"]) {
  -webkit-appearance: button;
  background-color: #0000;
  background-image: none;
}

:-moz-focusring {
  outline: auto;
}

:-moz-ui-invalid {
  box-shadow: none;
}

progress {
  vertical-align: baseline;
}

::-webkit-inner-spin-button {
  height: auto;
}

::-webkit-outer-spin-button {
  height: auto;
}

[type="search"] {
  -webkit-appearance: textfield;
  outline-offset: -2px;
}

::-webkit-search-decoration {
  -webkit-appearance: none;
}

::-webkit-file-upload-button {
  -webkit-appearance: button;
  font: inherit;
}

summary {
  display: list-item;
}

blockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol, ul, menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

dialog {
  padding: 0;
}

textarea {
  resize: vertical;
}

input::-moz-placeholder {
  opacity: 1;
  color: #9ca3af;
}

textarea::-moz-placeholder {
  opacity: 1;
  color: #9ca3af;
}

input::placeholder, textarea::placeholder {
  opacity: 1;
  color: #9ca3af;
}

button, [role="button"] {
  cursor: pointer;
}

:disabled {
  cursor: default;
}

img, svg, video, canvas, audio, iframe, embed, object {
  vertical-align: middle;
  display: block;
}

img, video {
  max-width: 100%;
  height: auto;
}

[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}

.container {
  width: 100%;
}

@media (min-width: 640px) {
  .container {
    max-width: 640px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}

@media (min-width: 1536px) {
  .container {
    max-width: 1536px;
  }
}

.\!visible {
  visibility: visible !important;
}

.visible {
  visibility: visible;
}

.invisible {
  visibility: hidden;
}

.collapse {
  visibility: collapse;
}

.static {
  position: static;
}

.fixed {
  position: fixed;
}

.absolute {
  position: absolute;
}

.relative {
  position: relative;
}

.sticky {
  position: sticky;
}

.block {
  display: block;
}

.inline {
  display: inline;
}

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.table {
  display: table;
}

.grid {
  display: grid;
}

.contents {
  display: contents;
}

.hidden {
  display: none;
}

.shrink {
  flex-shrink: 1;
}

.grow {
  flex-grow: 1;
}

.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.select-all {
  -webkit-user-select: all;
  user-select: all;
}

.resize {
  resize: both;
}

.rounded {
  border-radius: .25rem;
}

.border {
  border-width: 1px;
}

.uppercase {
  text-transform: uppercase;
}

.capitalize {
  text-transform: capitalize;
}

.italic {
  font-style: italic;
}

.underline {
  text-decoration-line: underline;
}

.line-through {
  text-decoration-line: line-through;
}

.shadow {
  --tw-shadow: 0 1px 3px 0 #0000001a, 0 1px 2px -1px #0000001a;
  --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}

.outline {
  outline-style: solid;
}

.ring {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

.blur {
  --tw-blur: blur(8px);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}

.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}

.transition {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter, backdrop-filter;
  transition-duration: .15s;
  transition-timing-function: cubic-bezier(.4, 0, .2, 1);
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/Inter-Regular.ttf") format("truetype");
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/Inter-Medium.ttf") format("truetype");
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/Inter-Bold.ttf") format("truetype");
}

:root, .light, [data-theme="light"] {
  --lightningcss-light: initial;
  --lightningcss-dark: ;
  color-scheme: light;
  --white: #fff;
  --black: #000;
  --snow: #fcfcfc;
  --eclipse: #18181b;
  --spacing: .25rem;
  --radius: .5rem;
  --field-radius: calc(var(--radius) * 1.5);
  --radius-xs: calc(var(--radius) * .25);
  --radius-sm: calc(var(--radius) * .5);
  --radius-md: calc(var(--radius) * .75);
  --radius-lg: calc(var(--radius) * 1);
  --radius-xl: calc(var(--radius) * 1.5);
  --radius-2xl: calc(var(--radius) * 2);
  --radius-3xl: calc(var(--radius) * 3);
  --radius-4xl: calc(var(--radius) * 4);
  --border-width: 1px;
  --field-border-width: 0px;
  --disabled-opacity: .5;
  --ring-offset-width: 2px;
  --cursor-interactive: pointer;
  --cursor-disabled: not-allowed;
  --background: #f6f5f3;
  --foreground: var(--eclipse);
  --surface: var(--white);
  --surface-foreground: var(--foreground);
  --surface-secondary: #f1f0ed;
  --surface-tertiary: #eceae7;
  --overlay: var(--white);
  --overlay-foreground: var(--foreground);
  --muted: #71717a;
  --scrollbar: #d4d4d8;
  --default: #ecebe9;
  --default-foreground: var(--eclipse);
  --accent: #20428d;
  --accent-foreground: var(--snow);
  --field-background: var(--white);
  --field-foreground: var(--eclipse);
  --field-placeholder: var(--muted);
  --field-border: transparent;
  --success: #17c964;
  --success-foreground: var(--eclipse);
  --warning: #f5a524;
  --warning-foreground: var(--eclipse);
  --danger: #ff383c;
  --danger-foreground: var(--snow);
  --segment: var(--white);
  --segment-foreground: var(--eclipse);
  --border: #dfdedb;
  --separator: #e6e4e2;
  --focus: var(--accent);
  --link: var(--accent);
  --backdrop: #1c181280;
  --surface-hover: color-mix(in oklab, var(--surface) 92%, var(--surface-foreground) 8%);
  --background-secondary: color-mix(in oklab, var(--background) 96%, var(--foreground) 4%);
  --background-tertiary: color-mix(in oklab, var(--background) 92%, var(--foreground) 8%);
  --default-hover: color-mix(in oklab, var(--default) 96%, var(--default-foreground) 4%);
  --accent-hover: color-mix(in oklab, var(--accent)  90%, var(--accent-foreground)  10%);
  --success-hover: color-mix(in oklab, var(--success) 90%, var(--success-foreground) 10%);
  --warning-hover: color-mix(in oklab, var(--warning) 90%, var(--warning-foreground) 10%);
  --danger-hover: color-mix(in oklab, var(--danger)  90%, var(--danger-foreground)  10%);
  --accent-soft: color-mix(in oklab, var(--accent)  15%, transparent);
  --accent-soft-foreground: var(--accent);
  --accent-soft-hover: color-mix(in oklab, var(--accent) 20%, transparent);
  --danger-soft: color-mix(in oklab, var(--danger)  15%, transparent);
  --danger-soft-foreground: var(--danger);
  --warning-soft: color-mix(in oklab, var(--warning) 15%, transparent);
  --warning-soft-foreground: var(--warning);
  --success-soft: color-mix(in oklab, var(--success) 15%, transparent);
  --success-soft-foreground: var(--success);
  --separator-secondary: color-mix(in oklab, var(--surface) 85%, var(--surface-foreground) 15%);
  --separator-tertiary: color-mix(in oklab, var(--surface) 81%, var(--surface-foreground) 19%);
  --border-secondary: color-mix(in oklab, var(--surface) 78%, var(--surface-foreground) 22%);
  --border-tertiary: color-mix(in oklab, var(--surface) 66%, var(--surface-foreground) 34%);
  --surface-shadow: 0 2px 4px 0 #0000000a,
    0 1px 2px 0 #0000000f,
    0 0 1px 0 #0000000f;
  --overlay-shadow: 0 2px 8px 0 #0000000f,
    0 -6px 12px 0 #00000008,
    0 14px 28px 0 #00000014;
  --field-shadow: 0 2px 4px 0 #0000000a,
    0 1px 2px 0 #0000000f,
    0 0 1px 0 #0000000f;
  --ease-smooth: ease;
  --ease-out-fluid: cubic-bezier(.32, .72, 0, 1);
  --ease-out-quart: cubic-bezier(.165, .84, .44, 1);
  --ease-out-expo: cubic-bezier(.19, 1, .22, 1);
  --ease-in-out-quart: cubic-bezier(.77, 0, .175, 1);
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --font-serif: "Source Serif 4", "Source Serif Pro", "Times New Roman", Georgia, serif;
}

@supports (color: lab(0% 0 0)) {
  :root, .light, [data-theme="light"] {
    --white: lab(100% 0 0);
    --black: lab(0% 0 0);
    --snow: lab(98.9676% -.0000298023 -.0000119209);
    --eclipse: lab(8.34178% .607349 -2.12998);
    --background: lab(96.529% .167698 1.12771);
    --surface-secondary: lab(94.7919% .224859 1.50445);
    --surface-tertiary: lab(92.8227% .282735 1.88161);
    --muted: lab(47.8738% 1.41454 -4.98644);
    --scrollbar: lab(84.9837% .601262 -2.17986);
    --default: lab(93.049% .167787 1.12778);
    --accent: lab(29.07% 9.446 -45.8035);
    --success: lab(71.4376% -59.4106 38.0321);
    --warning: lab(74.4448% 23.7172 71.6451);
    --danger: lab(57.4234% 73.5589 48.0136);
    --border: lab(88.4119% .225127 1.50465);
    --separator: lab(90.7319% .225008 1.50456);
  }
}

.dark, [data-theme="dark"] {
  --lightningcss-light: ;
  --lightningcss-dark: initial;
  color-scheme: dark;
  --background: #08090c;
  --foreground: var(--snow);
  --surface: #181b20;
  --surface-foreground: var(--foreground);
  --surface-secondary: #21242a;
  --surface-tertiary: #25292f;
  --overlay: #181b20;
  --overlay-foreground: var(--foreground);
  --muted: #9ba0aa;
  --scrollbar: #9ba0aa;
  --default: #26292f;
  --default-foreground: var(--snow);
  --field-background: #181b20;
  --field-foreground: var(--foreground);
  --accent: #5182e5;
  --warning: #f7b750;
  --danger: #db3b3e;
  --segment: #44484f;
  --segment-foreground: var(--foreground);
  --border: #2b2e34;
  --separator: #21242a;
  --backdrop: #0009;
  --surface-shadow: 0 0 0 0 transparent inset;
  --overlay-shadow: 0 0 1px 0 #ffffff4d inset;
  --field-shadow: 0 0 0 0 transparent inset;
}

@supports (color: lab(0% 0 0)) {
  .dark, [data-theme="dark"] {
    --background: lab(2.46141% -.0727028 -1.49426);
    --surface: lab(9.46397% -.24958 -4.43659);
    --surface-secondary: lab(14.1004% -.288859 -4.81411);
    --surface-tertiary: lab(16.4212% -.303298 -4.82038);
    --overlay: lab(9.46397% -.24958 -4.43659);
    --muted: lab(65.7187% -.465721 -5.61757);
    --scrollbar: lab(65.7187% -.465721 -5.61757);
    --default: lab(16.4264% -.29324 -4.4555);
    --field-background: lab(9.46397% -.24958 -4.43659);
    --accent: lab(54.5283% 7.71454 -56.6837);
    --warning: lab(79.1095% 16.747 59.9157);
    --danger: lab(50.9109% 62.2712 37.59);
    --segment: lab(30.3443% -.359163 -4.84617);
    --border: lab(18.7471% -.303835 -4.46033);
    --separator: lab(14.1058% -.280976 -4.45004);
  }
}

*, :before, :after {
  box-sizing: border-box;
}

html, body {
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior: none;
  height: 100%;
  margin: 0;
  padding: 0;
}

html {
  background: var(--background);
}

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

button {
  font-family: inherit;
}

.display {
  letter-spacing: -.02em;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.05;
  font-family: var(--font-serif);
  font-style: italic;
}

.h1 {
  letter-spacing: -.02em;
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.1;
}

.h2 {
  letter-spacing: -.02em;
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1.15;
}

.h3 {
  letter-spacing: -.015em;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}

.h4 {
  letter-spacing: -.01em;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
}

.h5 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
}

.h6 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.body {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
}

.body-sm {
  font-size: .875rem;
  font-weight: 400;
  line-height: 1.5;
}

.body-xs {
  font-size: .75rem;
  font-weight: 400;
  line-height: 1.25;
}

.label {
  color: var(--foreground);
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.25;
}

.caption {
  color: var(--muted);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.25;
}

.code, code {
  font-family: var(--font-mono);
  background: var(--default);
  color: var(--foreground);
  border-radius: var(--radius-sm);
  padding: .125rem .375rem;
  font-size: .875em;
}

a, .link {
  color: var(--link);
  text-underline-offset: 4px;
  font-weight: 500;
  text-decoration: underline;
}

.muted {
  color: var(--muted);
}

.surface {
  background: var(--surface);
  color: var(--surface-foreground);
  box-shadow: var(--surface-shadow);
  border-radius: min(32px, var(--radius-3xl));
}

.overlay {
  background: var(--overlay);
  color: var(--overlay-foreground);
  box-shadow: var(--overlay-shadow);
  border-radius: min(32px, var(--radius-3xl));
}

.brand-mark {
  font-family: var(--font-serif);
  color: var(--accent-foreground);
  background: var(--accent);
  border-radius: 10px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  font-size: 26px;
  font-weight: 700;
  line-height: .85;
  display: inline-flex;
}

.brand-mark--lg {
  border-radius: 14px;
  width: 48px;
  height: 48px;
  font-size: 38px;
}

.brand-mark--sm {
  border-radius: 7px;
  width: 24px;
  height: 24px;
  font-size: 20px;
}

.brand-mark span {
  transform: translateY(-2px);
}

.brand-wordmark {
  color: var(--foreground);
  align-items: center;
  gap: 8px;
  text-decoration: none;
  display: inline-flex;
}

.brand-wordmark__word {
  letter-spacing: -.02em;
  font-size: 17px;
  font-weight: 600;
}

.button {
  cursor: pointer;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
  height: 36px;
  transition: transform .25s var(--ease-smooth), background-color .1s var(--ease-smooth);
  color: var(--foreground);
  background: none;
  border: none;
  border-radius: 9999px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  position: relative;
}

.button:active {
  transform: scale(.97);
}

.button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.button svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.button--sm {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.button--lg {
  height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

.button--primary {
  background: var(--accent);
  color: var(--accent-foreground);
}

.button--primary:hover {
  background: var(--accent-hover);
}

.button--secondary {
  background: var(--default);
  color: var(--accent);
}

.button--secondary:hover {
  background: var(--default-hover);
}

.button--tertiary {
  background: var(--default);
  color: var(--foreground);
}

.button--tertiary:hover {
  background: var(--default-hover);
}

.button--ghost {
  color: var(--foreground);
  background: none;
}

.button--ghost:hover {
  background: var(--default);
}

.button--outline {
  border: 1px solid var(--border);
  color: var(--foreground);
  background: none;
}

.button--outline:hover {
  background: var(--default);
}

.button--danger {
  background: var(--danger);
  color: var(--danger-foreground);
}

.button--danger:hover {
  background: var(--danger-hover);
}

.button--danger-soft {
  background: var(--danger-soft);
  color: var(--danger-soft-foreground);
}

.button--icon-only {
  width: 36px;
  padding: 0;
}

.button--icon-only.button--sm {
  width: 30px;
}

.card {
  background: var(--surface);
  color: var(--surface-foreground);
  border: 1px solid var(--border);
  box-shadow: var(--surface-shadow);
  border-radius: 16px;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  display: flex;
}

.card--padded {
  padding: 20px;
}

.card--flat {
  box-shadow: none;
}

.chip {
  background: var(--default);
  color: var(--default-foreground);
  white-space: nowrap;
  border-radius: 999px;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 500;
  line-height: 18px;
  display: inline-flex;
}

.chip--soft-accent {
  background: var(--accent-soft);
  color: var(--accent-soft-foreground);
}

.chip--soft-success {
  background: var(--success-soft);
  color: var(--success-soft-foreground);
}

.chip--soft-warning {
  background: var(--warning-soft);
  color: var(--warning-soft-foreground);
}

.chip--soft-danger {
  background: var(--danger-soft);
  color: var(--danger-soft-foreground);
}

.chip__dot {
  background: currentColor;
  border-radius: 999px;
  width: 6px;
  height: 6px;
}

.avatar {
  background: var(--default);
  width: 32px;
  height: 32px;
  color: var(--accent);
  letter-spacing: -.01em;
  border-radius: 999px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
}

.avatar--sm {
  width: 22px;
  height: 22px;
  font-size: 10px;
}

.avatar--lg {
  width: 40px;
  height: 40px;
  font-size: 14px;
}

.avatar--accent {
  background: var(--accent-soft);
  color: var(--accent-soft-foreground);
}

.avatar--success {
  background: var(--success-soft);
  color: var(--success-soft-foreground);
}

.avatar--warning {
  background: var(--warning-soft);
  color: var(--warning-soft-foreground);
}

.avatar--danger {
  background: var(--danger-soft);
  color: var(--danger-soft-foreground);
}

.input {
  background: var(--field-background);
  height: 34px;
  color: var(--field-foreground);
  font-size: 13px;
  font-family: var(--font-sans);
  border: 1px solid var(--border);
  width: 100%;
  transition: box-shadow .15s var(--ease-smooth), border-color .15s var(--ease-smooth);
  border-radius: 10px;
  outline: none;
  padding: 0 10px;
}

.input::placeholder {
  color: var(--field-placeholder);
}

.input:focus {
  box-shadow: 0 0 0 2px var(--focus);
  border-color: #0000;
}

.input--lg {
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
}

.textarea {
  background: var(--field-background);
  color: var(--field-foreground);
  font-size: 13px;
  font-family: var(--font-sans);
  border: 1px solid var(--border);
  resize: vertical;
  width: 100%;
  min-height: 80px;
  transition: box-shadow .15s var(--ease-smooth), border-color .15s var(--ease-smooth);
  border-radius: 10px;
  outline: none;
  padding: 10px;
}

.textarea::placeholder {
  color: var(--field-placeholder);
}

.textarea:focus {
  box-shadow: 0 0 0 2px var(--focus);
  border-color: #0000;
}

.label {
  color: var(--foreground);
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 500;
  display: block;
}

.input--compact {
  height: 32px;
  font-size: 12px;
}

select.input {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 10px center;
  background-repeat: no-repeat;
  padding-right: 28px;
}

.separator {
  background: var(--separator);
  border: none;
  width: 100%;
  height: 1px;
}

.switch {
  background: var(--default);
  cursor: pointer;
  width: 34px;
  height: 20px;
  transition: background .15s var(--ease-smooth);
  border: none;
  border-radius: 9999px;
  flex-shrink: 0;
  padding: 0;
  position: relative;
}

.switch[data-on="true"] {
  background: var(--accent);
}

.switch:after {
  content: "";
  background: var(--surface);
  width: 16px;
  height: 16px;
  transition: left .15s var(--ease-out-fluid);
  border-radius: 999px;
  position: absolute;
  top: 2px;
  left: 2px;
  box-shadow: 0 1px 2px #0003;
}

.switch[data-on="true"]:after {
  left: 16px;
}

.app {
  grid-template-columns: 240px minmax(0, 1fr);
  width: 100%;
  height: 100vh;
  display: grid;
  overflow: hidden;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--separator);
  flex-direction: column;
  gap: 16px;
  padding: 14px 12px;
  display: flex;
  overflow-y: auto;
}

.sidebar__brand {
  padding: 4px 8px 0;
}

.sidebar__nav {
  flex-direction: column;
  gap: 2px;
  display: flex;
}

.sidebar__heading {
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 8px 6px;
  font-size: 10px;
  font-weight: 600;
}

.nav-item {
  color: var(--foreground);
  cursor: pointer;
  text-align: left;
  background: none;
  border: none;
  border-radius: 8px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background .1s;
  display: flex;
}

.nav-item:hover {
  background: var(--default);
}

.nav-item[data-active="true"] {
  background: var(--accent-soft);
  color: var(--accent-soft-foreground);
}

.nav-item[data-active="true"] svg {
  color: var(--accent);
}

.nav-item svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex-shrink: 0;
}

.nav-item .count {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-left: auto;
  font-size: 11px;
}

.sidebar__user {
  cursor: pointer;
  border-radius: 10px;
  align-items: center;
  gap: 10px;
  padding: 8px;
  display: flex;
}

.sidebar__user:hover {
  background: var(--default);
}

.sidebar__user-name {
  font-size: 12px;
  font-weight: 500;
}

.sidebar__user-role {
  color: var(--muted);
  font-size: 11px;
}

.sidebar__user-meta {
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
  display: flex;
}

.sidebar__user-meta > span {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.workspace {
  background: var(--background);
  --sticky-top: 0px;
  flex-direction: column;
  display: flex;
  position: relative;
  overflow: hidden;
}

.workspace__main {
  flex: 1;
  overflow-y: auto;
}

.topbar {
  border-bottom: 1px solid var(--separator);
  background: var(--background);
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  display: flex;
}

.mobile-header {
  display: none;
}

.topbar__title {
  font-size: 15px;
  font-weight: 600;
}

.topbar__search {
  background: var(--default);
  max-width: 360px;
  height: 32px;
  color: var(--muted);
  cursor: text;
  border-radius: 10px;
  flex: 1;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  font-size: 13px;
  display: flex;
}

.topbar__search input {
  color: var(--foreground);
  font-size: 13px;
  font-family: var(--font-sans);
  background: none;
  border: none;
  outline: none;
  flex: 1;
}

.topbar__search input::placeholder {
  color: var(--muted);
}

.topbar__search > svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex-shrink: 0;
}

.topbar__search kbd {
  background: var(--surface);
  font-size: 11px;
  font-family: var(--font-sans);
  color: var(--muted);
  border-radius: 6px;
  padding: 1px 6px;
  font-weight: 500;
}

.topbar__spacer {
  flex: 1;
}

.topbar__actions {
  align-items: center;
  gap: 6px;
  display: flex;
}

.page {
  padding: 22px 24px 48px;
}

.page__header {
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
  display: flex;
}

.page__title {
  letter-spacing: -.02em;
  margin: 0;
  font-size: 28px;
  font-weight: 600;
}

.page__sub {
  color: var(--muted);
  margin: 6px 0 0;
  font-size: 14px;
}

.page__actions {
  gap: 8px;
  display: flex;
}

.page--narrow {
  max-width: 720px;
}

.page--bounded {
  max-width: 1180px;
}

.filter-row {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 0 14px;
  display: flex;
}

.filter-chip {
  background: var(--default);
  color: var(--foreground);
  cursor: pointer;
  border: none;
  border-radius: 999px;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  transition: background .1s;
  display: inline-flex;
}

.filter-chip[data-active="true"] {
  background: var(--accent);
  color: var(--accent-foreground);
}

.filter-chip:not([data-active="true"]):hover {
  background: var(--default-hover);
}

.matter-table {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--surface-shadow);
  border-radius: 14px;
  overflow: hidden;
}

.mt-row {
  border-top: 1px solid var(--separator);
  cursor: pointer;
  transition: background .1s var(--ease-smooth);
  grid-template-columns: 130px minmax(0, 2fr) 160px 1fr 110px 36px;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  font-size: 13px;
  display: grid;
}

.mt-row:first-child {
  border-top: none;
}

.mt-row:not(.mt-row--head):hover {
  background: var(--surface-secondary);
}

.mt-row--head {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--surface-secondary);
  cursor: default;
  font-size: 11px;
  font-weight: 600;
}

.mt-docket {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 12px;
}

.mt-title {
  font-family: var(--font-serif);
  letter-spacing: -.01em;
  color: var(--foreground);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-style: italic;
  font-weight: 600;
  overflow: hidden;
}

.mt-parties {
  color: var(--muted);
  margin-top: 1px;
  font-size: 12px;
}

.mt-lead {
  align-items: center;
  gap: 7px;
  display: flex;
}

.mt-lead-name, .mt-deadline {
  font-size: 12px;
}

.mt-deadline--warn {
  color: var(--warning);
  font-weight: 500;
}

.mt-deadline--ok {
  color: var(--muted);
}

.mt-icon-btn {
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  display: inline-flex;
}

.mt-icon-btn:hover {
  background: var(--default);
  color: var(--foreground);
}

.mt-icon-btn svg {
  width: 16px;
  height: 16px;
}

.kb-switch {
  margin-bottom: 14px;
}

.kb-table-head, .kb-table-row {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 130px 36px;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  display: grid;
}

.kb-table-head {
  background: var(--surface-secondary);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 11px;
  font-weight: 600;
}

.kb-table-row {
  border-top: 1px solid var(--separator);
  font-size: 13px;
}

.kb-table-row:hover {
  background: var(--surface-secondary);
}

.kb-row-link {
  min-width: 0;
  color: inherit;
  text-decoration: none;
  display: block;
}

.kb-col-tags {
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  display: flex;
}

.kb-col-added {
  min-width: 0;
}

@media (max-width: 767px) {
  .kb-table-head {
    display: none;
  }

  .kb-table-row {
    grid-template-columns: minmax(0, 1fr) 24px;
  }

  .kb-col-tags, .kb-col-added {
    display: none;
  }
}

.drawer-backdrop {
  background: var(--backdrop);
  z-index: 130;
  animation: backdrop-in .15s var(--ease-out-fluid);
  position: fixed;
  inset: 0;
}

@keyframes backdrop-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.drawer {
  background: var(--overlay);
  z-index: 41;
  border-left: 1px solid var(--separator);
  width: 480px;
  box-shadow: var(--overlay-shadow);
  animation: drawer-in .22s var(--ease-out-fluid);
  flex-direction: column;
  display: flex;
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
}

@keyframes drawer-in {
  from {
    opacity: 0;
    transform: translateX(8px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.drawer__header {
  border-bottom: 1px solid var(--separator);
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px 12px;
  display: flex;
}

.drawer__head-row {
  align-items: center;
  gap: 8px;
  display: flex;
}

.drawer__title {
  font-family: var(--font-serif);
  letter-spacing: -.015em;
  font-size: 22px;
  font-style: italic;
  font-weight: 600;
  line-height: 1.15;
}

.drawer__sub {
  color: var(--muted);
  gap: 10px;
  font-size: 12px;
  display: flex;
}

.drawer__close {
  margin-left: auto;
}

.drawer__body {
  flex-direction: column;
  flex: 1;
  gap: 22px;
  padding: 16px 18px;
  display: flex;
  overflow-y: auto;
}

.drawer__section {
  flex-direction: column;
  gap: 8px;
  display: flex;
}

.drawer__section-title {
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.party-row, .activity-row, .doc-row, .deadline-row {
  border-top: 1px solid var(--separator);
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  display: flex;
}

.party-row:first-child, .activity-row:first-child, .doc-row:first-child, .deadline-row:first-child {
  border-top: none;
  padding-top: 0;
}

.party-info {
  flex-direction: column;
  flex: 1;
  line-height: 1.25;
  display: flex;
}

.party-name {
  font-weight: 500;
}

.party-role {
  color: var(--muted);
  font-size: 12px;
}

.activity-icon {
  background: var(--default);
  width: 26px;
  height: 26px;
  color: var(--muted);
  border-radius: 8px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  display: inline-flex;
}

.activity-icon svg {
  width: 14px;
  height: 14px;
}

.activity-text {
  flex: 1;
  line-height: 1.4;
}

.activity-time {
  color: var(--muted);
  font-size: 11px;
}

.doc-icon {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  width: 28px;
  height: 32px;
  color: var(--accent);
  border-radius: 5px;
  justify-content: center;
  align-items: center;
  display: inline-flex;
}

.doc-icon svg {
  width: 14px;
  height: 14px;
}

.doc-name {
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  overflow: hidden;
}

.deadline-row {
  gap: 12px;
}

.deadline-date {
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  flex-shrink: 0;
  width: 44px;
  padding: 4px 0;
}

.deadline-date__m {
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-size: 9px;
}

.deadline-date__d {
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}

.deadline-body {
  flex: 1;
}

.deadline-title {
  font-size: 13px;
  font-weight: 500;
}

.deadline-meta {
  color: var(--muted);
  font-size: 11px;
}

.cal-tone-meeting {
  --tone-bg: var(--accent-soft);
  --tone-fg: var(--accent-soft-foreground);
  --tone-line: var(--accent);
}

.cal-tone-deadline {
  --tone-bg: var(--danger-soft);
  --tone-fg: var(--danger-soft-foreground);
  --tone-line: var(--danger);
}

.cal-tone-task {
  --tone-bg: var(--warning-soft);
  --tone-fg: var(--warning-soft-foreground);
  --tone-line: var(--warning);
}

.cal-tone-done {
  --tone-bg: var(--success-soft);
  --tone-fg: var(--success-soft-foreground);
  --tone-line: var(--success);
}

.calendar {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--surface-shadow);
  border-radius: 14px;
  min-width: 0;
  padding: 12px;
}

.cal-toolbar {
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  display: flex;
}

.cal-nav {
  align-items: center;
  gap: 6px;
  display: flex;
}

.cal-heading {
  letter-spacing: -.01em;
  font-size: 16px;
  font-weight: 600;
}

.cal-spacer {
  flex: 1;
}

.segmented {
  background: var(--surface-secondary);
  border-radius: 999px;
  gap: 2px;
  padding: 3px;
  display: inline-flex;
}

.segmented__item {
  color: var(--muted);
  cursor: pointer;
  transition: background .14s var(--ease-smooth), color .14s var(--ease-smooth);
  background: none;
  border: none;
  border-radius: 999px;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
}

.segmented__item[data-active="true"] {
  background: var(--surface);
  color: var(--foreground);
  box-shadow: 0 1px 3px color-mix(in oklab, var(--foreground) 12%, transparent);
}

.calendar-layout {
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 16px;
  display: grid;
}

.cal-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  display: grid;
}

.cal-grid--head {
  gap: 4px;
  margin-bottom: 4px;
}

.cal-dow {
  letter-spacing: .06em;
  color: var(--muted);
  text-transform: uppercase;
  text-align: center;
  padding: 2px 0;
  font-size: 10px;
  font-weight: 600;
}

.cal-day {
  background: var(--surface-secondary);
  text-align: left;
  min-height: 104px;
  color: inherit;
  cursor: pointer;
  transition: background .12s var(--ease-smooth), border-color .12s var(--ease-smooth);
  border: 1px solid #0000;
  border-radius: 10px;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 6px;
  font-family: inherit;
  font-size: 11px;
  display: flex;
  overflow: hidden;
}

.cal-day:hover {
  background: var(--surface-tertiary);
}

.cal-day[data-outside="true"] {
  opacity: .42;
}

.cal-day[data-selected="true"] {
  border-color: var(--border-secondary);
}

.cal-day[data-today="true"] {
  border-color: var(--accent);
}

.cal-day__num {
  border-radius: 999px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 22px;
  height: 22px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
}

.cal-day[data-today="true"] .cal-day__num {
  background: var(--accent);
  color: var(--accent-foreground, #fff);
}

.cal-day__events {
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  display: flex;
}

.cal-day__more {
  color: var(--muted);
  padding-left: 4px;
  font-size: 9px;
}

.cal-pin {
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--tone-bg);
  color: var(--tone-fg);
  border-radius: 5px;
  padding: 2px 5px;
  font-size: 10px;
  font-weight: 500;
  display: block;
  overflow: hidden;
}

.cal-pin__time {
  font-variant-numeric: tabular-nums;
  opacity: .75;
  margin-right: 4px;
}

.cal-side {
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  display: flex;
}

.cal-side__title {
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
}

.cal-side__empty {
  color: var(--muted);
  margin: 0;
  font-size: 12px;
}

.cal-row {
  border-top: 1px solid var(--separator);
  color: inherit;
  gap: 10px;
  padding: 9px 0;
  text-decoration: none;
  display: flex;
}

.cal-row:first-child {
  border-top: none;
}

.cal-row__rail {
  background: var(--tone-line);
  border-radius: 999px;
  flex-shrink: 0;
  width: 3px;
}

.cal-row__body {
  flex-direction: column;
  flex: 1;
  gap: 2px;
  min-width: 0;
  display: flex;
}

.cal-row__title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

.cal-row__meta {
  color: var(--muted);
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  display: flex;
}

.cal-row__time {
  font-variant-numeric: tabular-nums;
  color: var(--foreground);
  font-weight: 500;
}

.cal-row__chips {
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  display: flex;
}

.cal-row__sub {
  color: var(--muted);
  align-items: center;
  gap: 3px;
  font-size: 10px;
  display: inline-flex;
}

.cal-week {
  flex-direction: column;
  padding: 0;
  display: flex;
  overflow: hidden;
}

.cal-week__head, .cal-week__allday {
  grid-template-columns: 56px repeat(7, minmax(0, 1fr));
  display: grid;
}

.cal-week__head {
  border-bottom: 1px solid var(--separator);
  background: var(--surface);
}

.cal-week__dayhead {
  border-left: 1px solid var(--separator);
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 4px;
  display: flex;
}

.cal-week__dow {
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.cal-week__num {
  border-radius: 999px;
  justify-content: center;
  align-items: center;
  width: 26px;
  height: 26px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
}

.cal-week__dayhead[data-today="true"] .cal-week__num {
  background: var(--accent);
  color: var(--accent-foreground, #fff);
}

.cal-week__allday {
  border-bottom: 1px solid var(--separator);
  background: var(--surface);
  min-height: 34px;
}

.cal-week__alldaycell {
  border-left: 1px solid var(--separator);
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 4px;
  display: flex;
}

.cal-week__gutter {
  position: relative;
}

.cal-week__gutter--label {
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  text-align: right;
  padding: 8px 6px;
  font-size: 9px;
}

.cal-week__scroll {
  overscroll-behavior: contain;
  max-height: 68vh;
  overflow-y: auto;
}

.cal-week__sticky {
  z-index: 4;
  background: var(--surface);
  position: sticky;
  top: 0;
}

.cal-week__grid {
  grid-template-columns: 56px repeat(7, minmax(0, 1fr));
  display: grid;
  position: relative;
}

.cal-week__hourlabel {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 10px;
  position: absolute;
  right: 6px;
  transform: translateY(-50%);
}

.cal-week__hourlabel[data-first="true"] {
  transform: none;
}

.cal-week__col {
  border-left: 1px solid var(--separator);
  min-width: 0;
  position: relative;
}

.cal-week__col[data-today="true"] {
  background: color-mix(in oklab, var(--accent) 5%, transparent);
}

.cal-week__hourline {
  border-top: 1px solid var(--separator);
  position: absolute;
  left: 0;
  right: 0;
}

.cal-week__now {
  background: var(--danger);
  z-index: 2;
  height: 2px;
  position: absolute;
  left: 0;
  right: 0;
}

.cal-week__now:before {
  content: "";
  background: var(--danger);
  border-radius: 50%;
  width: 8px;
  height: 8px;
  position: absolute;
  top: -3px;
  left: -3px;
}

.cal-week__event {
  z-index: 1;
  position: absolute;
  left: 3px;
  right: 3px;
}

.cal-chip {
  background: var(--tone-bg);
  color: var(--tone-fg);
  border-left: 2px solid var(--tone-line);
  border-radius: 6px;
  align-items: baseline;
  gap: 5px;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  overflow: hidden;
}

.cal-chip__time {
  font-variant-numeric: tabular-nums;
  opacity: .8;
  flex-shrink: 0;
}

.cal-chip__text {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.cal-agenda {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--surface-shadow);
  border-radius: 14px;
  overflow: hidden;
}

.cal-agenda__day {
  border-top: 1px solid var(--separator);
  gap: 14px;
  padding: 12px 16px;
  display: flex;
}

.cal-agenda__day:first-child {
  border-top: none;
}

.cal-agenda__date {
  flex-direction: column;
  flex: 0 0 46px;
  align-items: center;
  gap: 1px;
  padding-top: 6px;
  display: flex;
}

.cal-agenda__dow {
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.cal-agenda__num {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.cal-agenda__month {
  text-transform: uppercase;
  color: var(--muted);
  font-size: 9px;
}

.cal-agenda__date[data-today="true"] .cal-agenda__num {
  color: var(--accent);
}

.cal-agenda__events {
  flex: 1;
  min-width: 0;
}

.cal-legend {
  color: var(--muted);
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 12px 2px 4px;
  font-size: 11px;
  display: flex;
}

.cal-legend__item {
  align-items: center;
  gap: 5px;
  display: flex;
}

.cal-legend__dot {
  background: var(--tone-line);
  border-radius: 3px;
  flex-shrink: 0;
  width: 9px;
  height: 9px;
}

.cal-legend__hint {
  display: none;
}

.cal-legend__keys {
  opacity: .75;
  margin-left: auto;
  font-size: 10px;
}

.matter-table[data-pending="true"] {
  opacity: .55;
  transition: opacity .12s var(--ease-smooth);
}

.spinner {
  border: 2px solid var(--border-secondary);
  border-top-color: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  width: 13px;
  height: 13px;
  animation: .6s linear infinite spin;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.progress-ring {
  flex-shrink: 0;
  display: block;
}

.progress-ring--spin {
  animation: .9s linear infinite spin;
}

.spin {
  transform-origin: 50%;
  animation: .9s linear infinite spin;
}

.route-pending {
  opacity: 0;
  min-height: 40vh;
  animation: route-pending-in .16s var(--ease-smooth) .25s forwards;
  justify-content: center;
  align-items: center;
  display: flex;
}

@keyframes route-pending-in {
  to {
    opacity: 1;
  }
}

.route-pending .spinner {
  border-width: 2.5px;
  width: 20px;
  height: 20px;
}

.timeline-more {
  color: var(--muted);
  align-items: center;
  gap: 8px;
  padding: 14px 4px;
  font-size: 12px;
  display: flex;
}

.timeline[data-pending="true"] {
  opacity: .45;
  transition: opacity .12s var(--ease-smooth);
  pointer-events: none;
}

.notif-panel {
  z-index: 70;
  transform-origin: 100% 0;
  flex-direction: column;
  width: min(320px, 100vw - 24px);
  max-height: 400px;
  padding: 0;
  display: flex;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  overflow: hidden;
}

.notif-panel__head {
  flex-shrink: 0;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  display: flex;
}

.notif-panel__title {
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.notif-panel__list {
  border-top: 1px solid var(--separator);
  flex: 1;
  overflow-y: auto;
}

.notif-actions {
  align-items: center;
  gap: 10px;
  display: flex;
}

.notif-action {
  color: var(--accent);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 11px;
}

.notif-action--muted {
  color: var(--muted);
}

.notif-empty {
  text-align: center;
  color: var(--muted);
  padding: 24px 14px;
  font-size: 13px;
}

.notif-item {
  border-bottom: 1px solid var(--separator);
  color: inherit;
  cursor: pointer;
  gap: 10px;
  padding: 10px 14px;
  text-decoration: none;
  transition: background .12s;
  display: flex;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item[data-unread="true"] {
  background: var(--accent-soft);
}

.notif-item:hover {
  background: var(--surface-secondary);
}

.notif-item__icon {
  background: var(--accent-soft);
  width: 28px;
  height: 28px;
  color: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  display: flex;
}

.notif-item__body {
  flex-direction: column;
  flex: 1;
  min-width: 0;
  display: flex;
}

.notif-item__headline {
  margin-bottom: 2px;
  font-size: 12px;
  line-height: 1.4;
}

.notif-item__action {
  color: var(--muted);
}

.notif-item__detail {
  color: var(--accent);
  font-weight: 600;
}

.notif-item__sub {
  color: var(--muted);
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 11px;
  line-height: 1.4;
  display: -webkit-box;
  overflow: hidden;
}

.notif-item__time {
  color: var(--muted);
  margin-top: 3px;
  font-size: 10px;
}

.notif-item__dot {
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin-top: 4px;
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(.97)translateY(-6px);
  }

  to {
    opacity: 1;
    transform: scale(1)translateY(0);
  }
}

@keyframes pop-in-up {
  from {
    opacity: 0;
    transform: scale(.97)translateY(6px);
  }

  to {
    opacity: 1;
    transform: scale(1)translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes badge-in {
  0% {
    transform: scale(0);
  }

  70% {
    transform: scale(1.15);
  }

  100% {
    transform: scale(1);
  }
}

.pop-menu {
  background: var(--surface);
  border: 1px solid var(--separator);
  z-index: 100;
  transform-origin: bottom;
  animation: pop-in-up .16s var(--ease-out-fluid) both;
  border-radius: 10px;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 8px;
  right: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px #00000024;
}

.pop-menu__item {
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: var(--foreground);
  background: none;
  border: none;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 13px;
  display: flex;
}

.pop-menu__item:hover {
  background: var(--surface-secondary);
}

.pop-menu__item--danger {
  color: var(--danger);
}

.pop-panel {
  animation: pop-in .15s var(--ease-out-fluid) both;
}

.seg-indicator {
  background: var(--surface);
  animation: fade-in .14s var(--ease-out-fluid) backwards;
  border-radius: 7px;
  position: absolute;
  inset: 0;
  box-shadow: 0 1px 3px #0000001a, 0 0 0 .5px #0000000f;
}

.nav-progress {
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  height: 2px;
  transition: opacity .12s linear;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

.nav-progress[data-active="true"] {
  opacity: 1;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--accent) 40%,
    var(--accent) 60%,
    transparent 100%);
  animation: nav-progress-slide 1.1s var(--ease-smooth) infinite;
  background-repeat: no-repeat;
  background-size: 40% 100%;
}

@keyframes nav-progress-slide {
  from {
    background-position: -40% 0;
  }

  to {
    background-position: 140% 0;
  }
}

.entity-header {
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  display: flex;
}

.entity-header__icon {
  background: var(--accent-soft);
  width: 48px;
  height: 56px;
  color: var(--accent);
  border-radius: 8px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  display: flex;
}

.entity-header__body {
  flex: auto;
  min-width: 0;
}

.entity-header__title {
  font-family: var(--font-serif);
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
  margin: 0;
  font-size: 24px;
  font-style: italic;
  font-weight: 600;
}

.entity-header__meta {
  color: var(--muted);
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
  font-size: 12px;
  display: flex;
}

.entity-header__actions {
  flex: none;
  align-items: center;
  gap: 8px;
  display: flex;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  display: grid;
}

.form-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid--tight {
  gap: 12px;
}

.form-grid > * {
  min-width: 0;
}

.data-table__row {
  grid-template-columns: var(--cols);
  border-top: 1px solid var(--separator);
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 12px 16px;
  display: grid;
}

.data-table__row > * {
  min-width: 0;
}

.data-table__row--head {
  background: var(--surface-secondary);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-top: none;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
}

.truncate {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.version-row {
  --cols: 52px minmax(0, 1fr) auto auto;
  gap: 12px;
  padding: 10px 16px;
}

.version-row[data-graph="true"] {
  --cols: var(--graph-width) 52px minmax(0, 1fr) auto auto;
}

.version-graph {
  flex-shrink: 0;
  align-self: stretch;
  margin: -10px 0;
  position: relative;
}

.version-graph__line {
  background: var(--border);
  width: 1.5px;
  margin-left: -.75px;
  position: absolute;
}

.version-graph__line--across {
  width: auto;
  height: 1.5px;
  margin-top: -.75px;
  margin-left: 0;
}

.version-graph__node {
  background: var(--surface);
  border: 1.5px solid var(--muted);
  border-radius: 999px;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  position: absolute;
  top: 50%;
}

.version-graph__node--master {
  background: var(--accent);
  border-color: var(--accent);
}

.version-row__actions {
  justify-self: end;
  align-items: center;
  gap: 4px;
  display: flex;
}

.icon-btn--placeholder {
  pointer-events: none;
  visibility: hidden;
}

.row-menu {
  z-index: 135;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 210px;
  padding: 5px;
  animation: .12s ease-out pop-in;
  position: fixed;
  box-shadow: 0 16px 40px -12px #00000047;
}

.row-menu__item {
  border-radius: var(--radius-md);
  text-align: left;
  width: 100%;
  color: var(--foreground);
  cursor: pointer;
  background: none;
  border: none;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  display: flex;
}

.row-menu__item:hover:not(:disabled) {
  background: var(--default);
}

.row-menu__item svg {
  color: var(--muted);
  flex-shrink: 0;
}

.row-menu__item:disabled {
  opacity: var(--disabled-opacity);
  cursor: var(--cursor-disabled);
}

.row-menu__item--danger {
  color: var(--danger);
}

.row-menu__item--danger:hover:not(:disabled) {
  background: var(--danger-soft);
}

.version-row__actions .icon-btn {
  width: 28px;
  height: 28px;
}

.docs-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  display: grid;
}

.doc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform .2s var(--ease-out-fluid);
  border-radius: 14px;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  display: flex;
}

.doc-card:hover {
  box-shadow: var(--surface-shadow);
  transform: translateY(-2px);
}

.doc-card__type {
  letter-spacing: .06em;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 600;
}

.doc-card__name {
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  font-weight: 500;
  display: -webkit-box;
  overflow: hidden;
}

.doc-card__meta {
  color: var(--muted);
  margin-top: auto;
  font-size: 11px;
}

.contacts-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.contact-row {
  border-top: 1px solid var(--separator);
  grid-template-columns: 32px minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) 120px;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  font-size: 13px;
  display: grid;
}

.contact-row:first-child {
  background: var(--surface-secondary);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-top: none;
  font-size: 11px;
  font-weight: 600;
}

.contact-name {
  font-weight: 500;
}

.contact-sub {
  color: var(--muted);
  font-size: 11px;
}

.settings-row {
  border-top: 1px solid var(--separator);
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  display: flex;
}

.settings-row:first-child {
  border-top: none;
}

.settings-label {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
}

.settings-desc {
  color: var(--muted);
  margin-top: 2px;
  font-size: 12px;
  font-weight: 400;
}

.toaster {
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 200;
  pointer-events: none;
  flex-direction: column-reverse;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: min(560px, 100vw - 32px);
  display: flex;
  position: fixed;
  transform: translateX(-50%);
}

.toast {
  pointer-events: auto;
  max-width: 100%;
  color: var(--foreground);
  background: var(--surface);
  border: 1px solid var(--border);
  animation: toast-rise .18s var(--ease-out-fluid);
  border-radius: 999px;
  align-items: center;
  gap: 9px;
  padding: 9px 8px 9px 14px;
  font-size: 12.5px;
  line-height: 1.35;
  display: flex;
  box-shadow: 0 16px 40px -12px #0000004d;
}

@keyframes toast-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast__icon {
  flex-shrink: 0;
  display: flex;
}

.toast[data-tone="success"] .toast__icon {
  color: var(--success);
}

.toast[data-tone="error"] .toast__icon {
  color: var(--danger);
}

.toast[data-tone="info"] .toast__icon {
  color: var(--accent);
}

.toast__text {
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  display: block;
  overflow: hidden;
}

.toast__action {
  background: var(--default);
  color: var(--foreground);
  cursor: pointer;
  border: none;
  border-radius: 999px;
  flex-shrink: 0;
  padding: 5px 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  transition: background .1s;
}

.toast__action:hover {
  background: var(--default-hover, var(--border));
}

.toast__close {
  width: 24px;
  height: 24px;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 999px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  display: flex;
}

.toast__close:hover {
  background: var(--default);
  color: var(--foreground);
}

@media (max-width: 767px) {
  .toaster {
    width: auto;
    max-width: none;
    left: 12px;
    right: 12px;
    bottom: calc(var(--tabbar-height, 50px) + env(safe-area-inset-bottom) + 10px);
    transition: bottom .26s var(--ease-smooth);
    align-items: stretch;
    gap: 6px;
    transform: none;
  }

  body:has(.search-pill) .toaster {
    bottom: calc(var(--tabbar-height, 50px) + env(safe-area-inset-bottom) + 70px);
  }

  body[data-mail-searching="true"] .toaster {
    bottom: calc(var(--vv-inset, 0px) + 70px);
    transition: none;
  }

  .toast {
    background: color-mix(in oklab, var(--surface) 84%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    min-height: 42px;
    box-shadow: var(--overlay-shadow);
    border-radius: 21px;
    padding: 4px 6px 4px 13px;
    font-size: 13px;
  }

  .toast__text {
    -webkit-line-clamp: 2;
    white-space: normal;
    -webkit-box-orient: vertical;
    flex: 1;
    padding: 5px 0;
    display: -webkit-box;
  }

  .passkey-prompt {
    transition: opacity .18s var(--ease-smooth), transform .18s var(--ease-smooth);
  }

  body:has(.toast) .passkey-prompt {
    opacity: 0;
    pointer-events: none;
    animation: none;
    transform: translateY(8px);
  }

  .toast__action {
    background: var(--accent-soft);
    height: 30px;
    color: var(--accent);
    border-radius: 15px;
    padding: 0 12px;
    font-size: 13px;
  }

  .toast__close {
    width: 30px;
    height: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    animation: none;
  }
}

.modal-backdrop {
  background: var(--backdrop);
  z-index: 130;
  justify-content: center;
  align-items: center;
  padding: 24px;
  display: flex;
  position: fixed;
  inset: 0;
}

.modal-backdrop--elevated {
  z-index: 9999;
}

.modal {
  background: var(--overlay);
  box-shadow: var(--overlay-shadow);
  border: 1px solid var(--border);
  border-radius: 20px;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  padding: 24px;
  display: flex;
  overflow-y: auto;
}

.modal--compact {
  max-width: 400px;
}

.modal__title {
  letter-spacing: -.015em;
  font-size: 18px;
  font-weight: 600;
}

.modal__sub {
  color: var(--muted);
  font-size: 13px;
}

.modal__form {
  flex-direction: column;
  gap: 14px;
  display: flex;
}

.modal__actions {
  justify-content: flex-end;
  gap: 8px;
  display: flex;
}

.modal__grabber, .modal-backdrop[data-stacked="true"], .modal[data-stacked="true"] {
  display: none;
}

.modal-backdrop[data-closing="true"] {
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s var(--ease-smooth);
  animation: none;
}

.modal[data-closing="true"] {
  opacity: 0;
  transition: transform .26s var(--ease-smooth), opacity .26s var(--ease-smooth);
  pointer-events: none;
  animation: none;
  transform: scale(.9)translateY(24px);
}

.icon-btn {
  cursor: pointer;
  width: 32px;
  height: 32px;
  color: var(--muted);
  background: none;
  border: none;
  border-radius: 8px;
  justify-content: center;
  align-items: center;
  transition: background .1s, color .1s;
  display: inline-flex;
}

.icon-btn:hover {
  background: var(--default);
  color: var(--foreground);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.row {
  align-items: center;
  gap: 8px;
  display: flex;
}

.col {
  flex-direction: column;
  gap: 8px;
  display: flex;
}

.spacer {
  flex: 1;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.italic-serif {
  font-family: var(--font-serif);
  font-style: italic;
}

input[type="datetime-local"] {
  width: 100%;
  min-width: 0;
}

.compose-card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--surface-shadow);
  transition: box-shadow .2s var(--ease-smooth);
  border-radius: 16px;
  overflow: hidden;
}

.compose-card:focus-within {
  box-shadow: 0 0 0 2px var(--accent-soft), var(--surface-shadow);
}

.compose-card__top {
  align-items: flex-start;
  gap: 10px;
  padding: 14px 14px 10px;
  display: flex;
}

.compose-card__field {
  --compose-h: 40px;
  --compose-h-expanded: 72px;
  min-height: var(--compose-h);
  flex: 1;
  position: relative;
}

.compose-card__field[data-expanded="true"] {
  min-height: var(--compose-h-expanded);
}

.compose-card__textarea {
  width: 100%;
  font-family: var(--font-sans);
  color: var(--foreground);
  resize: none;
  min-height: var(--compose-h);
  z-index: 2;
  background: none;
  border: none;
  outline: none;
  max-height: 200px;
  padding: 0;
  font-size: 14px;
  line-height: 1.5;
  position: absolute;
  inset: 0;
}

.compose-card__field[data-expanded="true"] .compose-card__textarea {
  min-height: var(--compose-h-expanded);
}

.compose-card__textarea::placeholder {
  color: var(--muted);
}

.compose-card__mirror {
  font-family: var(--font-sans);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  pointer-events: none;
  color: var(--foreground);
  z-index: 1;
  padding: 0;
  font-size: 14px;
  line-height: 1.5;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.compose-card__chips {
  border-top: 1px solid var(--separator);
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  display: flex;
}

.compose-chip {
  cursor: pointer;
  background: var(--default);
  color: var(--muted);
  border: none;
  border-radius: 999px;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  transition: background .1s, color .1s;
  display: inline-flex;
}

.compose-chip svg {
  width: 13px;
  height: 13px;
}

.compose-chip[data-active="true"] {
  background: var(--accent-soft);
  color: var(--accent-soft-foreground);
}

.compose-chip:hover:not([data-active="true"]) {
  background: var(--default-hover);
  color: var(--foreground);
}

.compose-card__dynamic {
  border-top: 1px solid var(--separator);
  background: var(--surface-secondary);
  flex-direction: column;
  gap: 12px;
  padding: 12px 14px;
  display: flex;
  overflow: hidden;
}

.compose-fields {
  flex-wrap: wrap;
  gap: 8px;
  display: flex;
}

.compose-field {
  flex: 120px;
  min-width: 0;
}

.compose-field[data-span="wide"] {
  flex: 2 180px;
}

.compose-stack {
  flex-direction: column;
  gap: 8px;
  display: flex;
}

.compose-label {
  font-size: 11px;
}

.compose-card__footer {
  border-top: 1px solid var(--separator);
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  display: flex;
}

.compose-card--drag-over {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft), var(--surface-shadow);
}

.compose-card__drag-hint {
  background: color-mix(in oklab, var(--accent-soft) 85%, transparent);
  color: var(--accent);
  pointer-events: none;
  z-index: 10;
  border-radius: 16px;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  position: absolute;
  inset: 0;
}

.timeline {
  flex-direction: column;
  gap: 0;
  display: flex;
}

.timeline-date-sep {
  align-items: center;
  gap: 10px;
  margin: 20px 0 6px;
  display: flex;
}

.timeline-date-sep--future .timeline-date-sep__date {
  color: var(--accent);
}

.timeline-date-sep--future .timeline-date-sep__rel {
  color: var(--accent);
  font-weight: 500;
}

.timeline-date-sep--future .timeline-date-sep__line {
  background: color-mix(in oklab, var(--accent) 30%, transparent 70%);
}

.timeline-date-sep__date {
  color: var(--foreground);
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
}

.timeline-date-sep__rel {
  color: var(--muted);
  font-size: 11px;
}

.timeline-date-sep__line {
  background: var(--separator);
  flex: 1;
  height: 1px;
}

.timeline-event {
  border-bottom: 1px solid var(--separator);
  gap: 12px;
  padding: 10px 0;
  display: flex;
  position: relative;
}

.timeline-event:last-child {
  border-bottom: none;
}

.timeline-event--future {
  background: color-mix(in oklab, var(--accent-soft) 40%, transparent 60%);
  border-left: 3px solid color-mix(in oklab, var(--accent) 50%, transparent 50%);
  border-radius: 10px;
  margin: 2px -10px;
  padding: 10px;
}

.timeline-event--future .timeline-event__time {
  color: var(--accent);
}

.timeline-event--completed {
  background: color-mix(in oklab, var(--success-soft) 35%, transparent 65%);
  border-left: 3px solid color-mix(in oklab, var(--success) 40%, transparent 60%);
  opacity: .7;
  border-radius: 10px;
  margin: 2px -10px;
  padding: 10px;
}

.timeline-event__icon {
  background: var(--default);
  width: 32px;
  height: 32px;
  color: var(--muted);
  border-radius: 10px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  margin-top: 2px;
  display: flex;
}

.timeline-event__icon svg {
  width: 15px;
  height: 15px;
}

.timeline-event__body {
  flex: 1;
  min-width: 0;
}

.timeline-event__meta {
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  display: flex;
}

.timeline-event__actor {
  font-size: 12px;
  font-weight: 500;
}

.timeline-event__time {
  color: var(--muted);
  font-size: 11px;
}

.timeline-event__title {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.timeline-event__excerpt {
  color: var(--muted);
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.5;
}

.timeline-event__chips {
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
  display: flex;
}

.timeline-event__controls {
  flex-shrink: 0;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  display: none;
}

.timeline-event:hover .timeline-event__controls {
  display: flex;
}

.timeline-ctrl-btn {
  cursor: pointer;
  width: 26px;
  height: 26px;
  color: var(--muted);
  background: none;
  border: none;
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  transition: background .1s, color .1s;
  display: inline-flex;
}

.timeline-ctrl-btn:hover {
  background: var(--default);
  color: var(--foreground);
}

.timeline-ctrl-btn--danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.timeline-ctrl-btn--success:hover {
  background: var(--success-soft);
  color: var(--success);
}

.timeline-ctrl-btn svg {
  width: 13px;
  height: 13px;
}

.timeline-edit-area {
  border: 1px solid var(--border);
  background: var(--surface);
  width: 100%;
  color: var(--foreground);
  resize: vertical;
  border-radius: 8px;
  outline: none;
  min-height: 60px;
  margin-top: 6px;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 13px;
}

.timeline-edit-area:focus {
  border-color: var(--accent);
}

.rp-section {
  flex-direction: column;
  gap: 10px;
  display: flex;
}

.rp-section-header {
  justify-content: space-between;
  align-items: center;
  display: flex;
}

.rp-section-title {
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.case-header {
  border-bottom: 1px solid var(--separator);
  background: var(--surface);
}

.case-header__top {
  align-items: center;
  gap: 10px;
  padding: 12px 24px 8px;
  display: flex;
}

.case-header__title {
  font-family: var(--font-serif);
  letter-spacing: -.02em;
  padding: 4px 24px 8px;
  font-size: 30px;
  font-style: italic;
  font-weight: 600;
  line-height: 1.1;
}

.case-header__meta {
  color: var(--muted);
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 0 24px 10px;
  font-size: 12px;
  display: flex;
}

.case-header__meta-item {
  align-items: center;
  gap: 5px;
  display: flex;
}

.case-header__meta-item svg {
  width: 13px;
  height: 13px;
}

.case-tabs {
  border-top: 1px solid var(--separator);
  align-items: center;
  gap: 0;
  padding: 0 24px;
  display: flex;
}

.case-tab {
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border: none;
  border-bottom: 2px solid #0000;
  margin-bottom: -1px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  transition: color .1s, border-color .1s;
}

.case-tab:hover {
  color: var(--foreground);
}

.case-tab[data-active="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.dropzone {
  border: 2px dashed var(--border);
  background: var(--surface-secondary);
  width: 100%;
  color: var(--muted);
  font: inherit;
  text-align: center;
  cursor: pointer;
  border-radius: 14px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 28px;
  transition: border-color .15s, background .15s;
  display: flex;
}

.dropzone:hover, .dropzone[data-active="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.dropzone__text {
  color: var(--muted);
  font-size: 13px;
}

.user-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.user-row {
  border-top: 1px solid var(--separator);
  grid-template-columns: 36px minmax(0, 1fr) minmax(0, 1.8fr) 120px 90px 68px;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  font-size: 13px;
  display: grid;
}

.user-row:first-child {
  background: var(--surface-secondary);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-top: none;
  font-size: 11px;
  font-weight: 600;
}

.user-row > :nth-child(2) {
  min-width: 0;
}

.user-row > :nth-child(3) {
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
}

@media (pointer: fine) {
  ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }

  ::-webkit-scrollbar-track {
    background: none;
  }

  ::-webkit-scrollbar-thumb {
    background: var(--scrollbar);
    border-radius: 999px;
  }
}

@media (pointer: coarse) {
  * {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  ::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }

  * {
    -webkit-tap-highlight-color: transparent;
  }

  button, .button, .icon-btn, .tabbar, .tabbar__item, .nav-item, .chip, .compose-chip, .filter-chip, .sheet__grabber, .modal__grabber, .sheet__navbar, .case-tabs, .mt-row--head, .row-menu, .pop-menu {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }

  button, .button, a, .icon-btn, .tabbar__item, .chip, [role="menuitem"], [role="tab"] {
    touch-action: manipulation;
  }

  .workspace__main, .sheet, .modal, .docview__scroll, .docview__pdf, .docwork__canvas, .case-tab-content, .row-menu, .mailx__rows, .mailx__messages, .attachpick__list {
    overscroll-behavior: contain;
  }
}

input, textarea, select, button {
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.case-mobile-segtabs {
  display: none;
}

.case-detail-split {
  grid-template-columns: minmax(0, 68fr) minmax(0, 32fr);
  display: grid;
  overflow: hidden;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  display: grid;
}

.filter-chip {
  white-space: nowrap;
}

.tabbar {
  display: none;
}

.sheet-backdrop {
  z-index: 120;
  background: var(--backdrop);
  animation: backdrop-in .16s var(--ease-out-fluid);
  align-items: flex-end;
  display: flex;
  position: fixed;
  inset: 0;
}

.sheet {
  background: var(--surface);
  width: 100%;
  max-height: 88vh;
  padding: 8px 14px calc(18px + env(safe-area-inset-bottom));
  box-shadow: var(--overlay-shadow);
  animation: sheet-in .26s var(--ease-out-fluid);
  border-radius: 22px 22px 0 0;
  overflow-y: auto;
}

@keyframes sheet-in {
  from {
    opacity: .6;
    transform: translateY(14%);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sheet-backdrop[data-stacked="true"], .sheet[data-stacked="true"] {
  display: none;
}

.sheet-backdrop[data-closing="true"] {
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s var(--ease-smooth);
  animation: none;
}

.sheet[data-closing="true"] {
  transition: transform .18s var(--ease-in-out-quart);
  pointer-events: none;
  animation: none;
  transform: translateY(100%);
}

.sheet__grabber {
  touch-action: none;
  justify-content: center;
  align-items: center;
  width: 118px;
  height: 21px;
  margin: -2px auto 6px;
  display: flex;
}

.sheet__grabber:before {
  content: "";
  background: var(--border-secondary);
  border-radius: 999px;
  width: 38px;
  height: 5px;
}

.sheet {
  touch-action: pan-y;
}

.sheet__identity {
  border-bottom: 1px solid var(--separator);
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 4px 6px 14px;
  display: flex;
}

.sheet__name {
  font-size: 15px;
  font-weight: 600;
}

.sheet__role {
  color: var(--muted);
  font-size: 12px;
}

.sheet__group {
  background: var(--surface-secondary);
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
}

.sheet__grouptitle {
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 14px 4px;
  font-size: 10px;
  font-weight: 600;
}

.sheet__row {
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
  align-items: center;
  gap: 12px;
  padding: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  display: flex;
}

.sheet__rowlabel {
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.sheet__row + .sheet__row {
  border-top: 1px solid var(--separator);
}

.sheet__row:active {
  background: var(--surface-tertiary);
}

.sheet__row--danger {
  color: var(--danger);
}

@media (max-width: 768px) {
  html {
    height: 100%;
    overflow: hidden;
  }

  body {
    --tabbar-height: 50px;
    width: 100%;
    height: 100%;
    min-height: 0;
    position: fixed;
    inset: 0;
    overflow: hidden;
  }

  :is(html:has( > body > .lp), html:has( > body > .pub)) {
    height: auto;
    overflow: visible;
  }

  :is(html:has( > body > .lp) body, html:has( > body > .pub) body) {
    width: auto;
    height: auto;
    min-height: 100dvh;
    position: static;
    inset: auto;
    overflow: visible;
  }

  input, textarea, select, .input, .textarea, .topbar__search input, .compose-card__textarea, .mailx__editorbody, .compose-card__mirror {
    font-size: 16px !important;
  }

  .docs-filter-row select.input {
    height: 36px !important;
    font-size: 14px !important;
  }

  .app {
    grid-template-columns: minmax(0, 1fr);
    height: 100dvh;
  }

  .sidebar {
    display: none;
  }

  .tabbar {
    z-index: 90;
    padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in oklab, var(--surface) 82%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--separator);
    transition: transform .26s var(--ease-smooth), opacity .2s var(--ease-smooth);
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
  }

  .tabbar__item {
    min-height: 50px;
    color: var(--muted);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color .12s var(--ease-smooth);
    background: none;
    border: none;
    flex-direction: column;
    flex: 1;
    justify-content: center;
    align-items: center;
    gap: 3px;
    padding: 7px 2px 6px;
    font-family: inherit;
    text-decoration: none;
    display: flex;
  }

  .tabbar__item[data-active="true"] {
    color: var(--accent);
  }

  .tabbar__icon {
    display: inline-flex;
    position: relative;
  }

  .tabbar__badge {
    background: var(--danger);
    width: 8px;
    height: 8px;
    box-shadow: 0 0 0 2px var(--surface);
    border-radius: 50%;
    position: absolute;
    top: -2px;
    right: -4px;
  }

  .tabbar__badge--quiet {
    background: var(--accent);
  }

  .tabbar__badge--count {
    font-variant-numeric: tabular-nums;
    width: auto;
    min-width: 14px;
    height: 14px;
    color: var(--danger-foreground, #fff);
    border-radius: 999px;
    justify-content: center;
    align-items: center;
    padding: 0 4px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    top: -5px;
    right: -7px;
  }

  .tabbar__item:active {
    opacity: .6;
  }

  .tabbar__label {
    letter-spacing: -.01em;
    font-size: 10px;
    font-weight: 500;
  }

  .topbar {
    display: none;
  }

  .workspace {
    --top-clearance: 22px;
    --top-bar-height: 44px;
    padding-top: calc(env(safe-area-inset-top) + var(--top-clearance));
    --sticky-top: calc(var(--top-bar-height) - var(--top-clearance));
    --tabbar-height: 50px;
  }

  .mobile-header {
    height: calc(env(safe-area-inset-top) + var(--top-bar-height, 44px));
    z-index: 95;
    pointer-events: none;
    background: none;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 8px;
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
  }

  .mobile-header:before {
    content: "";
    background: color-mix(in srgb, var(--background) 72%, transparent);
    border-bottom: 1px solid var(--separator);
    opacity: 0;
    transition: opacity .22s var(--ease-smooth);
    position: absolute;
    inset: 0;
  }

  .mobile-header[data-scrolled="true"]:before {
    opacity: 1;
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
  }

  .mobile-header__title {
    letter-spacing: -.01em;
    color: var(--foreground);
    opacity: 0;
    transition: opacity .2s var(--ease-smooth), transform .2s var(--ease-out-fluid);
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: calc(100% - 32px);
    font-size: 15px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transform: translateY(4px);
  }

  .mobile-header[data-scrolled="true"] .mobile-header__title {
    opacity: 1;
    transform: none;
  }

  @supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .mobile-header:before {
      background: var(--background);
    }
  }

  body[data-workspace="document"] .mobile-header {
    display: none;
  }

  .page {
    padding: 0 16px calc(78px + env(safe-area-inset-bottom));
  }

  .page__title {
    letter-spacing: -.02em;
    font-size: 28px;
  }

  .page__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
  }

  .list-search {
    flex: auto;
    max-width: none;
  }

  .filter-row {
    overscroll-behavior-x: none;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    padding-bottom: 10px;
    overflow: auto hidden;
  }

  .filter-row::-webkit-scrollbar {
    display: none;
  }

  .mt-row.mt-row--head {
    display: none !important;
  }

  .mt-row {
    -moz-column-gap: 8px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 5px 8px;
    padding: 12px 14px;
    display: grid !important;
  }

  .mt-docket, .mt-lead, .mt-deadline {
    display: none;
  }

  .mt-row > :nth-child(2) {
    grid-area: 1 / 1 / 2 / 3;
    min-width: 0;
  }

  .mt-row > :nth-child(3) {
    grid-area: 2 / 1 / 3 / 2;
  }

  .mt-row > :nth-child(5) {
    grid-area: 2 / 2 / 3 / 3;
    justify-self: start;
  }

  .mt-row > :nth-child(6) {
    grid-area: 1 / 3 / 3 / 4;
    align-self: center;
  }

  .mt-title {
    font-size: 15px;
  }

  .mt-parties {
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12.5px;
    overflow: hidden;
  }

  .mt-row .chip {
    white-space: nowrap;
    max-width: none;
    padding: 2px 7px;
    font-size: 10px;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .deadline-row .chip {
    text-overflow: ellipsis;
    max-width: 80px;
    overflow: hidden;
    display: inline-block !important;
  }

  .workspace {
    min-height: 0;
  }

  .case-tab-content {
    flex: none !important;
    height: auto !important;
    overflow: auto !important;
  }

  .case-tab-panel {
    height: auto !important;
    padding: 16px !important;
    overflow-y: visible !important;
  }

  .case-detail-split {
    height: auto !important;
    display: block !important;
    overflow: visible !important;
  }

  .case-mobile-segtabs {
    background: var(--surface-secondary);
    border-bottom: 1px solid var(--separator);
    gap: 6px;
    padding: 10px 16px;
    display: flex;
  }

  .case-mobile-segtab {
    color: var(--muted);
    cursor: pointer;
    background: none;
    border: none;
    border-radius: 8px;
    flex: 1;
    padding: 7px 12px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    transition: background .12s, color .12s, box-shadow .12s;
  }

  .case-mobile-segtab[data-active="true"] {
    background: var(--surface);
    color: var(--foreground);
    box-shadow: 0 1px 3px color-mix(in oklab, var(--foreground) 10%, transparent);
  }

  .case-detail-split[data-pane="info"] .case-timeline-col, .case-detail-split[data-pane="timeline"] .case-panel-col {
    display: none !important;
  }

  .case-timeline-col {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    border-right: none !important;
    height: auto !important;
    padding: 16px !important;
    overflow: visible !important;
  }

  .case-panel-col {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: auto !important;
    padding: 12px 16px !important;
    overflow: visible !important;
  }

  .case-panel-col > div {
    width: 100%;
  }

  .case-timeline-col, .case-panel-col {
    padding-bottom: calc(78px + env(safe-area-inset-bottom)) !important;
  }

  .case-glance-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .case-header__top {
    flex-wrap: wrap;
    padding: 10px 16px 6px;
  }

  .case-header__title {
    overflow-wrap: anywhere;
    padding: 4px 16px 6px;
    font-size: 22px;
  }

  .case-header__meta {
    gap: 10px;
    padding: 0 16px 10px;
  }

  .case-tabs {
    overscroll-behavior-x: none;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 16px;
    overflow: auto hidden;
  }

  .case-tabs::-webkit-scrollbar {
    display: none;
  }

  .case-tab {
    white-space: nowrap;
    padding: 10px 12px;
    font-size: 12px;
  }

  .modal-backdrop {
    animation: backdrop-in .16s var(--ease-out-fluid);
    align-items: flex-end;
    padding: 0;
  }

  .modal[data-stacked="true"], .modal--compact[data-stacked="true"] {
    display: none;
  }

  .modal-backdrop[data-closing="true"] {
    transition-duration: .16s;
  }

  .modal[data-closing="true"], .modal--compact[data-closing="true"] {
    transition: transform .18s var(--ease-in-out-quart);
    transform: translateY(100%);
  }

  .modal, .modal--compact {
    animation: sheet-in .26s var(--ease-out-fluid);
    max-width: 100%;
    max-height: 92dvh;
    padding: 8px 18px calc(20px + env(safe-area-inset-bottom));
    touch-action: pan-y;
    border-radius: 20px 20px 0 0;
    overflow: hidden auto;
  }

  .modal__grabber {
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
    width: 118px;
    height: 17px;
    margin: 0 auto 10px;
    display: flex;
  }

  .modal__grabber:before {
    content: "";
    background: var(--border-secondary);
    border-radius: 999px;
    width: 38px;
    height: 5px;
  }

  .modal__form {
    display: contents;
  }

  .modal__actions {
    bottom: calc(-1 * (20px + env(safe-area-inset-bottom)));
    z-index: 1;
    margin: 4px -18px calc(-20px - env(safe-area-inset-bottom));
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
    background: var(--overlay);
    border-top: 1px solid var(--separator);
    gap: 10px;
    position: sticky;
  }

  .modal__actions .button {
    border-radius: 12px;
    flex: 1;
    justify-content: center;
    height: 44px;
    font-size: 15px;
  }

  .modal__title {
    font-size: 17px;
  }

  .input, select.input {
    border-radius: 12px;
    height: 44px;
    padding: 0 12px;
  }

  select.input {
    background-position: right 12px center;
    padding-right: 32px;
  }

  .textarea {
    border-radius: 12px;
    min-height: 104px;
    padding: 12px;
    line-height: 1.5;
  }

  input[type="date"], input[type="datetime-local"], input[type="time"] {
    min-width: 0;
    max-width: 100%;
  }

  .label {
    margin-bottom: 4px;
    font-size: 13px;
    display: block;
  }

  .input--compact {
    height: 44px;
    font-size: 16px;
  }

  .drawer {
    width: 100%;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }

  .entity-header {
    flex-wrap: wrap;
  }

  .entity-header__title {
    font-size: 19px;
  }

  .entity-header__icon {
    width: 38px;
    height: 44px;
  }

  .entity-header__actions {
    width: 100%;
  }

  .entity-header__actions .button {
    flex: 1;
    justify-content: center;
  }

  .form-grid, .form-grid--3 {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .sheet__navbar {
    border-bottom: 1px solid var(--separator);
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 2px 4px 12px;
    display: grid;
  }

  .sheet__back {
    color: var(--accent);
    cursor: pointer;
    background: none;
    border: none;
    justify-self: start;
    align-items: center;
    gap: 2px;
    padding: 0;
    font-family: inherit;
    font-size: 15px;
    display: inline-flex;
  }

  .sheet__navtitle {
    white-space: nowrap;
    font-size: 15px;
    font-weight: 600;
  }

  .sheet__navbar .notif-actions {
    justify-self: end;
  }

  .sheet__navbar--titleonly {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .sheet__navbar--titleonly .sheet__navtitle {
    text-align: left;
  }

  .sheet__group--flush {
    padding: 0;
  }

  .sheet__group--flush .notif-item {
    padding: 14px;
  }

  .sheet__group--flush .notif-item__headline {
    font-size: 14px;
  }

  .sheet__group--flush .notif-item__sub {
    font-size: 13px;
  }

  .sheet__group--flush .notif-item__time {
    font-size: 11px;
  }

  .sheet__chevron {
    color: var(--muted);
    flex-shrink: 0;
    margin-left: auto;
  }

  .sheet__count {
    background: var(--danger);
    color: #fff;
    border-radius: 999px;
    justify-content: center;
    align-items: center;
    min-width: 20px;
    height: 20px;
    margin-left: auto;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
  }

  .sheet__count + .sheet__chevron {
    margin-left: 8px;
  }

  .version-row, .version-row[data-graph="true"] {
    --cols: 44px minmax(0, 1fr);
    gap: 8px 10px;
    padding: 10px 14px;
  }

  .version-row[data-graph="true"] {
    padding-left: calc(14px + var(--graph-width));
    position: relative;
  }

  .version-row[data-graph="true"] > .version-graph {
    margin: 0;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 10px;
  }

  .version-graph {
    margin: -10px 0;
  }

  .version-row__edit {
    display: none;
  }

  .desktop-only {
    display: none !important;
  }

  .version-row__milestone {
    grid-column: 2 / -1;
  }

  .version-row__actions {
    flex-wrap: wrap;
    grid-column: 2 / -1;
    justify-self: start;
  }

  .version-row__actions .icon-btn {
    width: 32px;
    height: 32px;
  }

  .upload-row {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .upload-row__remove {
    justify-self: end;
  }

  .docs-filter {
    flex: 100%;
  }

  .docs-filter select.input {
    flex: 1;
    min-width: 0 !important;
  }

  .calendar-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .cal-toolbar {
    gap: 8px;
  }

  .cal-heading {
    flex-basis: 100%;
    order: -1;
    font-size: 15px;
  }

  .cal-nav {
    order: 1;
  }

  .cal-spacer {
    display: none;
  }

  .segmented {
    order: 2;
    margin-left: auto;
  }

  .cal-day {
    align-items: center;
    gap: 3px;
    min-height: 56px;
    padding: 4px 3px;
  }

  .cal-day__num {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }

  .cal-day__events {
    flex-flow: wrap;
    justify-content: center;
    gap: 3px;
  }

  .cal-pin {
    background: var(--tone-line);
    border-radius: 50%;
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    padding: 0;
    font-size: 0;
  }

  .cal-pin__time, .cal-day__more, .cal-legend__keys {
    display: none;
  }

  .cal-legend__hint {
    color: var(--muted);
    font-size: 11px;
    display: inline;
  }

  .cal-week__scroll {
    -webkit-overflow-scrolling: touch;
    max-height: 58dvh;
    overflow-x: auto;
  }

  .cal-week__sticky, .cal-week__head, .cal-week__allday, .cal-week__grid {
    min-width: 620px;
  }

  .cal-agenda__day {
    gap: 10px;
    padding: 10px 12px;
  }

  .docs-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .compose-card__field {
    --compose-h: 52px;
    --compose-h-expanded: 84px;
  }

  .compose-card {
    box-sizing: border-box;
    width: 100%;
  }

  .compose-card__chips {
    gap: 5px;
  }

  .compose-chip {
    padding: 3px 8px;
    font-size: 11px;
  }

  .compose-fields {
    flex-direction: column;
    gap: 10px;
  }

  .compose-field, .compose-field[data-span="wide"] {
    flex: auto;
    width: 100%;
  }

  .compose-label {
    font-size: 13px;
  }

  .timeline-event--future, .timeline-event--completed {
    margin: 2px 0;
  }

  .timeline-event {
    min-width: 0;
  }

  .timeline-event__body {
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
  }

  .timeline-event__title, .timeline-event__excerpt {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .case-docs-head {
    display: none !important;
  }

  .case-docs-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px !important;
  }

  .case-docs-row > :nth-child(2), .case-docs-row > :nth-child(3), .case-docs-row > :nth-child(4) {
    display: none !important;
  }

  .user-row {
    grid-template-columns: 32px minmax(0, 1fr) auto auto;
    gap: 10px;
    padding: 12px 14px;
  }

  .user-row > :nth-child(3), .user-row > :nth-child(4) {
    display: none;
  }
}

.inactivity-overlay {
  z-index: 9000;
  background: var(--backdrop);
  -webkit-backdrop-filter: blur(4px);
  animation: backdrop-in .2s var(--ease-out-fluid) both;
  justify-content: center;
  align-items: center;
  display: flex;
  position: fixed;
  inset: 0;
}

.inactivity-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--overlay-shadow);
  width: 100%;
  max-width: 340px;
  animation: modal-slide-up .22s var(--ease-out-quart) both;
  text-align: center;
  border-radius: 20px;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 32px 28px 24px;
  display: flex;
}

@keyframes modal-slide-up {
  from {
    opacity: 0;
    transform: translateY(12px)scale(.97);
  }

  to {
    opacity: 1;
    transform: translateY(0)scale(1);
  }
}

.inactivity-modal__badge {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  width: 44px;
  height: 44px;
  color: var(--muted);
  border-radius: 14px;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
  display: flex;
}

.inactivity-modal__title {
  letter-spacing: -.01em;
  color: var(--foreground);
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
}

.inactivity-modal__body {
  color: var(--muted);
  margin: 0 0 20px;
  font-size: 13px;
  line-height: 1.5;
}

.inactivity-countdown {
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
  display: flex;
  position: relative;
}

.inactivity-countdown__num {
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  pointer-events: none;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  position: absolute;
}

.inactivity-modal__actions {
  gap: 10px;
  width: 100%;
  display: flex;
}

.inactivity-modal__actions .button {
  flex: 1;
}

.mention-chip {
  background: var(--accent-soft);
  color: var(--accent-soft-foreground);
  white-space: nowrap;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: .9em;
  font-weight: 500;
  display: inline;
}

.compose-card__mirror .mention-chip {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  white-space: inherit;
  box-shadow: 0 0 0 2px var(--accent-soft);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  border-radius: 3px;
  padding: 0;
}

.mention-chip--self {
  background: var(--warning-soft);
  color: var(--warning-soft-foreground);
}

.notif-bell {
  align-items: center;
  display: inline-flex;
  position: relative;
}

.notif-badge {
  background: var(--danger);
  color: #fff;
  pointer-events: none;
  min-width: 16px;
  height: 16px;
  animation: badge-in .22s var(--ease-out-fluid) backwards;
  border-radius: 999px;
  justify-content: center;
  align-items: center;
  padding: 0 3px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  position: absolute;
  top: -4px;
  right: -4px;
}

.mention-dropdown {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 220px;
  overflow: hidden;
  box-shadow: 0 8px 24px #0000001f;
}

.mention-dropdown-item {
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: var(--foreground);
  background: none;
  border: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 13px;
  transition: background 80ms;
  display: flex;
}

.mention-dropdown-item:hover, .mention-dropdown-item[data-active="true"] {
  background: var(--surface-secondary);
}

html, body {
  transition: background-color .22s;
}

.sidebar, .topbar {
  transition: background-color .22s, border-color .22s;
}

.page {
  animation: page-enter .24s var(--ease-out-quart) backwards;
}

@keyframes page-enter {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-backdrop {
  animation: .18s backdrop-enter;
}

@keyframes backdrop-enter {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (min-width: 768px) {
  .modal {
    animation: modal-enter .22s var(--ease-out-quart);
  }
}

@keyframes modal-enter {
  from {
    opacity: 0;
    transform: scale(.97)translateY(8px);
  }

  to {
    opacity: 1;
    transform: scale(1)translateY(0);
  }
}

.compose-card__dynamic {
  animation: compose-dynamic-enter .17s var(--ease-out-quart) backwards;
}

@keyframes compose-dynamic-enter {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.timeline-event {
  animation: timeline-event-enter .22s var(--ease-out-quart) backwards;
}

.timeline-event:first-child {
  animation-delay: 0s;
}

.timeline-event:nth-child(2) {
  animation-delay: 30ms;
}

.timeline-event:nth-child(3) {
  animation-delay: 55ms;
}

.timeline-event:nth-child(4) {
  animation-delay: 75ms;
}

.timeline-event:nth-child(5) {
  animation-delay: 90ms;
}

.timeline-event:nth-child(n+6) {
  animation-delay: .1s;
}

@keyframes timeline-event-enter {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.dashboard-widget {
  animation: widget-enter .28s var(--ease-out-quart) backwards;
}

.dashboard-widget:first-child {
  animation-delay: 0s;
}

.dashboard-widget:nth-child(2) {
  animation-delay: 50ms;
}

.dashboard-widget:nth-child(3) {
  animation-delay: 90ms;
}

.dashboard-widget:nth-child(4) {
  animation-delay: .12s;
}

.dashboard-widget:nth-child(5) {
  animation-delay: .145s;
}

.dashboard-widget:nth-child(6) {
  animation-delay: .165s;
}

@keyframes widget-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page, .modal-backdrop, .modal, .compose-card__dynamic, .timeline-event, .dashboard-widget {
    animation: none !important;
  }

  html, body, .sidebar, .topbar {
    transition: none !important;
  }
}

.cmd-trigger {
  cursor: pointer;
  border: none;
  font-family: inherit;
  font-size: 13px;
  transition: background .14s, box-shadow .14s;
}

.cmd-trigger:hover {
  box-shadow: 0 0 0 1.5px var(--accent);
}

.cmd-backdrop {
  z-index: 199;
  background: #00000080;
  animation: .1s ease-out fade-in;
  position: fixed;
  inset: 0;
}

.cmd-backdrop[data-closing="true"] {
  opacity: 0;
  transition: opacity .16s var(--ease-smooth);
  pointer-events: none;
  animation: none;
}

.cmd-panel {
  z-index: 200;
  width: 580px;
  max-width: calc(100vw - 32px);
  animation: pop-in .14s var(--ease-out-fluid);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  flex-direction: column;
  margin: 0 auto;
  display: flex;
  position: fixed;
  top: 18vh;
  left: 0;
  right: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px #00000014, 0 12px 48px #00000038, 0 0 0 .5px #0000000f;
}

.cmd-panel[data-closing="true"] {
  opacity: 0;
  transition: opacity .18s var(--ease-smooth), transform .18s var(--ease-smooth);
  pointer-events: none;
  animation: none;
  transform: scale(.97)translateY(-6px);
}

.cmd-input-row {
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 16px;
  display: flex;
}

.cmd-search-icon {
  color: var(--muted);
  flex-shrink: 0;
}

.cmd-input {
  font-size: 17px;
  font-family: var(--font-sans);
  color: var(--foreground);
  caret-color: var(--accent);
  background: none;
  border: none;
  outline: none;
  flex: 1;
}

.cmd-input::placeholder {
  color: var(--muted);
}

.cmd-spinner {
  border: 2px solid var(--separator);
  border-top-color: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  animation: .65s linear infinite cmd-spin;
}

@keyframes cmd-spin {
  to {
    transform: rotate(360deg);
  }
}

.cmd-divider {
  background: var(--separator);
  flex-shrink: 0;
  height: 1px;
}

.cmd-results {
  max-height: 368px;
  padding: 6px 0;
  overflow-y: auto;
}

.cmd-section-label {
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  -webkit-user-select: none;
  user-select: none;
  align-items: center;
  gap: 5px;
  padding: 10px 16px 4px;
  font-size: 10px;
  font-weight: 600;
  display: flex;
}

.cmd-section-count {
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
  font-size: 10px;
  font-weight: 500;
}

.cmd-item {
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: var(--foreground);
  background: none;
  border: none;
  align-items: center;
  gap: 12px;
  padding: 7px 16px;
  font-family: inherit;
  transition: background 80ms;
  display: flex;
}

.cmd-item[data-selected="true"], .cmd-item:hover {
  background: var(--surface-secondary);
}

.cmd-item__icon {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  width: 30px;
  height: 30px;
  color: var(--foreground-secondary);
  border-radius: 7px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  display: flex;
}

.cmd-item__icon--accent {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: #0000;
}

.cmd-item__body {
  flex: 1;
  min-width: 0;
}

.cmd-item__label {
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13.5px;
  font-weight: 500;
  overflow: hidden;
}

.cmd-item__sub {
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  margin-top: 1px;
  font-size: 11.5px;
  overflow: hidden;
}

.cmd-item--answer {
  align-items: flex-start;
}

.cmd-item--answer .cmd-item__sub {
  white-space: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-top: 2px;
  line-height: 1.4;
  display: -webkit-box;
}

.cmd-empty__hint {
  margin-top: 4px;
  font-size: 12px;
  display: block;
}

.cmd-item__arrow {
  color: var(--muted);
  opacity: 0;
  flex-shrink: 0;
  transition: opacity .1s;
}

.cmd-item[data-selected="true"] .cmd-item__arrow, .cmd-item:hover .cmd-item__arrow {
  opacity: 1;
}

.cmd-empty {
  text-align: center;
  color: var(--muted);
  padding: 36px 16px;
  font-size: 13px;
}

.cmd-footer {
  border-top: 1px solid var(--separator);
  background: var(--surface-secondary);
  flex-shrink: 0;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  display: flex;
}

.cmd-hint {
  color: var(--muted);
  align-items: center;
  gap: 4px;
  font-size: 11px;
  display: flex;
}

.cmd-hint kbd {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 10px;
  font-family: var(--font-sans);
  letter-spacing: 0;
  border-radius: 4px;
  padding: 1px 5px;
}

@media (prefers-reduced-motion: reduce) {
  .cmd-trigger, .cmd-item, .cmd-item__arrow {
    transition: none !important;
  }

  .cmd-spinner {
    animation: none !important;
  }

  .spinner {
    animation-duration: 1.4s;
  }

  .spin {
    animation-duration: 1.8s;
  }

  .nav-progress[data-active="true"] {
    background: var(--accent);
    animation: none;
  }

  .pop-menu, .pop-panel, .cmd-panel, .cmd-backdrop, .seg-indicator, .notif-badge {
    animation: none !important;
  }
}

.redline-picker {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
  display: grid;
}

.redline-picker__side {
  min-width: 0;
}

.redline-picker__swap {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin-bottom: 1px;
}

.redline-bar {
  top: var(--sticky-top, 0px);
  z-index: 5;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  margin: 0 -24px 14px;
  position: sticky;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .redline-bar {
    background: var(--background);
  }
}

.redline-bar__identical {
  color: var(--muted);
  padding: 10px 24px;
  font-size: 12px;
  font-style: italic;
  display: block;
}

.redline-bar__top {
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 8px 24px;
  display: flex;
}

.redline-stat-group {
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  display: inline-flex;
}

.redline-stat-group__label {
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.redline-stat {
  color: var(--foreground);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
}

.redline-stat--add {
  color: var(--success);
}

.redline-stat--del {
  color: var(--danger);
}

.redline-bar__nav {
  align-items: center;
  gap: 4px;
  margin-left: auto;
  display: flex;
}

.redline-bar__position {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-right: 2px;
  font-size: 11px;
}

.redline-bar__versions {
  border-top: 1px solid var(--separator);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  display: grid;
}

.redline-bar__version {
  color: var(--muted);
  letter-spacing: .03em;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 6px 24px;
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
}

.redline-bar__version + .redline-bar__version {
  border-left: 1px solid var(--border);
}

.redline-bar__side {
  display: none;
}

.redline-state {
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface);
  border-radius: 10px;
  align-items: center;
  gap: 8px;
  padding: 14px;
  font-size: 13px;
  display: flex;
}

.redline-state--error {
  color: var(--danger);
  border-color: var(--danger);
}

.redline {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
}

.redline__body {
  flex-direction: column;
  display: flex;
}

.redline__row {
  border-bottom: 1px solid var(--separator);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  scroll-margin-block: 120px;
  display: grid;
}

.redline__row:last-child {
  border-bottom: none;
}

.redline__cell {
  overflow-wrap: break-word;
  min-width: 0;
  padding: 7px 14px;
  font-size: 13px;
  line-height: 1.62;
}

.redline__cell--right {
  border-left: 1px solid var(--border);
}

.redline__row[data-kind="equal"] .redline__cell {
  color: var(--muted);
}

.redline__row[data-kind="delete"] .redline__cell--left, .redline__row[data-kind="modify"] .redline__cell--left {
  background: color-mix(in oklab, var(--danger) 7%, transparent);
}

.redline__row[data-kind="insert"] .redline__cell--right, .redline__row[data-kind="modify"] .redline__cell--right {
  background: color-mix(in oklab, var(--success) 8%, transparent);
}

.redline__row[data-cursor="true"] {
  box-shadow: inset 3px 0 0 var(--accent);
}

.redline-ins {
  background: color-mix(in oklab, var(--success) 22%, transparent);
  color: var(--foreground);
  border-radius: 3px;
  padding: 0 1px;
  text-decoration: none;
}

.redline-del {
  background: color-mix(in oklab, var(--danger) 20%, transparent);
  color: var(--foreground);
  border-radius: 3px;
  padding: 0 1px;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.redline__gap {
  text-align: center;
  border: none;
  border-bottom: 1px solid var(--separator);
  background: var(--surface-secondary);
  width: 100%;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  display: block;
}

.redline__gap:hover {
  background: var(--default);
  color: var(--foreground);
}

@media (max-width: 768px) {
  .redline-picker {
    grid-template-columns: minmax(0, 1fr);
  }

  .redline-picker__swap {
    justify-self: center;
    margin: 2px 0;
  }

  .redline-bar {
    margin: 0 -16px 14px;
  }

  .redline-bar__top {
    gap: 10px;
    padding: 8px 16px;
  }

  .redline-bar__nav {
    margin-left: auto;
  }

  .redline-stat-group__label {
    font-size: 9px;
  }

  .redline-stat {
    font-size: 11px;
  }

  .redline-bar__versions {
    grid-template-columns: minmax(0, 1fr);
  }

  .redline-bar__version {
    padding: 5px 16px;
  }

  .redline-bar__version + .redline-bar__version {
    border-left: none;
    border-top: 1px solid var(--separator);
  }

  .redline-bar__side {
    background: var(--default);
    color: var(--muted);
    letter-spacing: .06em;
    text-transform: uppercase;
    border-radius: 4px;
    margin-right: 6px;
    padding: 1px 5px;
    font-size: 9px;
    display: inline-block;
  }

  .redline__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .redline__cell--right {
    border-left: none;
    border-top: 1px solid var(--separator);
  }

  .redline__row[data-kind="equal"] .redline__cell--right, .redline__cell:empty {
    display: none;
  }

  .redline__row[data-kind="modify"] .redline__cell:before {
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2px;
    font-size: 9px;
    font-weight: 600;
    display: block;
  }

  .redline__row[data-kind="modify"] .redline__cell--left:before {
    content: "Before";
  }

  .redline__row[data-kind="modify"] .redline__cell--right:before {
    content: "After";
  }
}

.docwork {
  background: var(--background);
  flex-direction: column;
  height: 100%;
  display: flex;
  position: relative;
}

body[data-workspace="document"] .app {
  grid-template-columns: minmax(0, 1fr);
}

body[data-workspace="document"] .sidebar, body[data-workspace="document"] .topbar {
  display: none;
}

body[data-workspace="document"] .workspace__main {
  overflow: hidden;
}

.docwork__bar {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  display: flex;
}

.docwork__exit {
  cursor: pointer;
  background: var(--default);
  width: 30px;
  height: 30px;
  color: var(--muted);
  border: none;
  border-radius: 8px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  font-family: inherit;
  display: inline-flex;
}

.docwork__exit:hover {
  background: var(--danger);
  color: var(--danger-foreground);
}

.docwork__ident {
  flex: 1;
  align-items: center;
  gap: 8px;
  min-width: 0;
  display: flex;
}

.docwork__identicon {
  color: var(--accent);
  flex-shrink: 0;
}

.docwork__identtext {
  flex-direction: column;
  min-width: 0;
  display: flex;
}

.docwork__title {
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
}

.docwork__sub {
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  line-height: 1.3;
  overflow: hidden;
}

.docwork__meta {
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  display: flex;
}

.docwork__pages {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 11px;
}

.docwork__zoom {
  align-items: center;
  gap: 2px;
  display: flex;
}

.docwork__zoom .icon-btn {
  width: 30px;
  height: 30px;
}

.docwork__zoomvalue {
  height: 30px;
  color: var(--muted);
  text-align: center;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 5px;
  justify-content: center;
  align-items: center;
  min-width: 42px;
  padding: 0 4px;
  font-family: inherit;
  font-size: 11px;
  display: inline-flex;
}

.docwork__zoomvalue:hover {
  background: var(--default);
  color: var(--foreground);
}

.docwork__status {
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  display: inline-flex;
}

.docwork__status--dirty {
  color: var(--warning);
}

.docwork__status--idle {
  opacity: .65;
}

.docwork__status--button {
  cursor: pointer;
  height: 30px;
  transition: background .12s var(--ease-smooth), border-color .12s var(--ease-smooth);
  background: none;
  border: 1px solid #0000;
  border-radius: 999px;
  margin: 0;
  padding: 0 10px;
  font-family: inherit;
}

.docwork__status--button:hover {
  background: var(--surface-secondary);
  border-color: var(--border);
  opacity: 1;
}

.docwork__status--button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

textarea[data-v2-ime-host] {
  line-height: 1 !important;
}

body[data-workspace="document"] {
  --sd-ui-font-family: var(--font-sans);
  --sd-font-family: var(--font-sans);
  --sd-ui-radius: var(--radius-lg);
  --sd-ui-border: var(--border);
  --sd-ui-bg: var(--surface);
  --sd-ui-text: var(--foreground);
  --sd-ui-text-muted: var(--muted);
  --sd-ui-text-disabled: color-mix(in oklab, var(--muted) 55%, transparent);
  --sd-ui-hover-bg: var(--default);
  --sd-ui-active-bg: var(--accent-soft);
  --sd-ui-disabled-bg: var(--surface-secondary);
  --sd-ui-action: var(--accent);
  --sd-ui-action-hover: var(--accent);
  --sd-ui-action-text: var(--accent-foreground);
  --sd-ui-shadow: var(--surface-shadow);
  --sd-ui-menu-bg: var(--surface);
  --sd-ui-menu-border: var(--border);
  --sd-ui-menu-radius: var(--radius-xl);
  --sd-ui-menu-shadow: 0 16px 40px -12px #00000047;
  --sd-ui-menu-text: var(--foreground);
  --sd-ui-menu-text-muted: var(--muted);
  --sd-ui-menu-font-size: 13px;
  --sd-ui-menu-header-bg: var(--surface-secondary);
  --sd-ui-menu-item-hover-bg: var(--default);
  --sd-ui-menu-item-active-bg: var(--accent-soft);
  --sd-ui-menu-item-active-text: var(--accent-soft-foreground);
  --sd-ui-menu-input-border: var(--border);
  --sd-ui-menu-input-focus-border: var(--accent);
  --sd-ui-dropdown-bg: var(--surface);
  --sd-ui-dropdown-border: var(--border);
  --sd-ui-dropdown-shadow: 0 16px 40px -12px #00000047;
  --sd-ui-dropdown-text: var(--foreground);
  --sd-ui-dropdown-hover-bg: var(--default);
  --sd-ui-dropdown-hover-text: var(--foreground);
  --sd-ui-dropdown-active-bg: var(--accent-soft);
  --sd-ui-dropdown-selected-text: var(--accent-soft-foreground);
  --sd-ui-dropdown-option-radius: var(--radius-md);
  --sd-popover-bg: var(--surface);
  --sd-popover-radius: var(--radius-xl);
  --sd-popover-shadow: 0 16px 40px -12px #00000047;
  --sd-ui-tooltip-bg: var(--eclipse);
  --sd-ui-tooltip-text: var(--snow);
  --sd-ui-tooltip-radius: var(--radius-md);
  --sd-ui-toolbar-bg: var(--surface);
  --sd-ui-toolbar-button-text: var(--foreground);
  --sd-ui-toolbar-button-hover-bg: var(--default);
  --sd-ui-toolbar-button-active-bg: var(--accent-soft);
  --sd-surface-card: var(--surface);
  --sd-surface-hover: var(--default);
  --sd-surface-muted: var(--surface-secondary);
  --sd-border-default: var(--border);
  --sd-text-primary: var(--foreground);
  --sd-text-muted: var(--muted);
  --sd-text-secondary: var(--muted);
  --sd-surface-page: var(--surface);
  --sd-surface-canvas: var(--surface-secondary);
  --sd-layout-page-bg: var(--surface);
}

.docwork__toolbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  overflow-x: auto;
}

.docwork__toolbar:empty {
  display: none;
}

.docwork__notices {
  flex-direction: column;
  flex-shrink: 0;
  gap: 1px;
  max-height: 30vh;
  display: flex;
  overflow-y: auto;
}

.docwork__canvas:lang(zh-Hant) {
  font-family: PingFang TC, Microsoft JhengHei, Noto Sans TC, Noto Sans CJK TC, Heiti TC, sans-serif;
}

.docwork__canvas:lang(zh-Hans) {
  font-family: PingFang SC, Microsoft YaHei, Noto Sans SC, Noto Sans CJK SC, Heiti SC, sans-serif;
}

.docwork__canvas {
  background: var(--surface-secondary);
  flex: 1;
  justify-content: center;
  min-height: 0;
  display: flex;
  overflow: auto;
}

.docwork__canvas > * {
  margin: 0 auto;
}

.docwork__state--overlay {
  z-index: 5;
  background: var(--background);
  position: absolute;
  inset: 0;
}

.docwork[data-opened="false"] {
  position: relative;
}

.docwork[data-opened="false"] .docwork__toolbar, .docwork[data-opened="false"] .docwork__canvas {
  visibility: hidden;
}

.docwork__state {
  color: var(--muted);
  background: var(--surface-secondary);
  flex-direction: column;
  flex: 1;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  display: flex;
}

.docwork__state--error {
  color: var(--danger);
}

.docwork__failed {
  color: var(--danger);
  text-align: center;
  background: var(--surface-secondary);
  flex: 1;
  justify-content: center;
  align-items: center;
  padding: 32px;
  font-size: 13px;
  display: flex;
}

.editor-state {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 12px;
  align-items: center;
  gap: 10px;
  padding: 28px;
  font-size: 13px;
  display: flex;
}

.editor-state--stacked {
  text-align: center;
  flex-direction: column;
  gap: 12px;
  padding: 40px 24px;
}

@media (max-width: 900px) {
  .docwork {
    height: auto;
  }
}

.timeline-event__action {
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 5px;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
}

.timeline-event__action:hover {
  background: var(--accent-soft-hover, var(--default));
}

.confirm-dialog__badge {
  background: color-mix(in oklab, var(--warning) 20%, transparent);
  width: 32px;
  height: 32px;
  color: var(--warning);
  border-radius: 9px;
  place-items: center;
  margin-bottom: 10px;
  display: inline-grid;
}

.confirm-dialog__body {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.confirm-dialog__body p {
  margin: 0 0 8px;
}

.confirm-dialog__body p:last-child {
  margin-bottom: 0;
}

.docview {
  background: var(--surface-secondary);
  flex-direction: column;
  height: 100%;
  display: flex;
}

.docview__bar {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  display: flex;
}

.docview__ident {
  flex: 1;
  align-items: center;
  gap: 8px;
  min-width: 0;
  display: flex;
}

.docview__identicon {
  color: var(--accent);
  flex-shrink: 0;
}

.docview__identtext {
  flex-direction: column;
  min-width: 0;
  display: flex;
}

.docview__name {
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
}

.docview__sub {
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  line-height: 1.3;
  overflow: hidden;
}

.docview__state {
  text-align: center;
  color: var(--muted);
  flex-direction: column;
  flex: 1;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 32px 24px;
  font-size: 13px;
  display: flex;
}

.docview__state--error {
  color: var(--danger);
}

.docview__scroll, .docview__pdf {
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  padding: 14px 12px calc(20px + env(safe-area-inset-bottom));
  flex: 1;
  overflow: auto;
}

.docview__pdf[hidden] {
  display: none;
}

.docview__pdf {
  flex-direction: column;
  align-items: center;
  gap: 12px;
  display: flex;
}

.docview__pdfpage {
  background: var(--white);
  border-radius: 4px;
  max-width: 100%;
  height: auto;
  box-shadow: 0 2px 10px -4px #00000059;
}

.docview__note {
  max-width: 820px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  align-items: flex-start;
  gap: 9px;
  margin: 0 auto 12px;
  padding: 9px 12px;
  font-size: 12px;
  display: flex;
}

.docview__note svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.docview__page {
  background: var(--surface);
  max-width: 820px;
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-wrap: break-word;
  margin: 0 auto;
  padding: clamp(18px, 5vw, 44px);
  font-size: 15px;
  line-height: 1.65;
}

.docview__page > :first-child {
  margin-top: 0;
}

.docview__page > :last-child {
  margin-bottom: 0;
}

.docview__page p {
  margin: 0 0 .9em;
}

.docview__page h1, .docview__page h2, .docview__page h3, .docview__page h4, .docview__page h5, .docview__page h6 {
  margin: 1.5em 0 .5em;
  font-weight: 650;
  line-height: 1.3;
}

.docview__page h1, .docview__title {
  font-size: 1.5em;
}

.docview__page h2 {
  font-size: 1.25em;
}

.docview__page h3 {
  font-size: 1.1em;
}

.docview__subtitle {
  color: var(--muted);
}

.docview__page ul, .docview__page ol {
  margin: 0 0 .9em;
  padding-left: 1.6em;
}

.docview__page li {
  margin-bottom: .35em;
}

.docview__page:lang(zh-Hant) ol {
  list-style-type: trad-chinese-informal;
}

.docview__page:lang(zh-Hans) ol {
  list-style-type: simp-chinese-informal;
}

.docview__page blockquote {
  border-left: 3px solid var(--border);
  color: var(--muted);
  margin: 0 0 .9em;
  padding-left: 14px;
}

.docview__page img {
  max-width: 100%;
  height: auto;
}

.docview__page a {
  color: var(--accent);
}

.docview__page table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 1em;
  font-size: .94em;
  display: block;
  overflow-x: auto;
}

.docview__page th, .docview__page td {
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  padding: 6px 9px;
}

.docview__page th {
  background: var(--surface-secondary);
  font-weight: 600;
}

@media (max-width: 900px) {
  .docview__page {
    box-shadow: none;
    border: none;
    border-radius: 0;
  }

  .docview__scroll {
    padding-left: 0;
    padding-right: 0;
  }

  .docview__note {
    margin-left: 12px;
    margin-right: 12px;
  }

  .docview__scroll, .docview__pdf {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }
}

.mention-field {
  min-height: var(--mention-h, 72px);
  --mention-font: 14px;
  --mention-pad: 0px;
  flex: 1;
  min-width: 0;
  position: relative;
}

.mention-field__input, .mention-field__mirror {
  font-family: var(--font-sans);
  font-size: var(--mention-font);
  padding: var(--mention-pad);
  letter-spacing: inherit;
  line-height: 1.5;
}

.mention-field__input {
  width: 100%;
  color: var(--foreground);
  resize: none;
  min-height: var(--mention-h, 72px);
  max-height: var(--mention-max-h, 200px);
  z-index: 2;
  background: none;
  border: none;
  outline: none;
  position: absolute;
  inset: 0;
}

.mention-field__input::placeholder {
  color: var(--field-placeholder, var(--muted));
}

.mention-field__mirror {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  pointer-events: none;
  color: var(--foreground);
  z-index: 1;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.mention-field__mirror .mention-chip, .compose-card__mirror .mention-chip {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  white-space: inherit;
  box-shadow: 0 0 0 2px var(--accent-soft);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  border-radius: 3px;
  padding: 0;
}

.mention-field--compose {
  --mention-h: 40px;
  min-height: var(--mention-h);
}

.mention-field--compose.is-expanded {
  --mention-h: 72px;
}

.mention-field--boxed {
  --mention-pad: 10px;
  --mention-font: 13px;
  --mention-h: 80px;
  --mention-max-h: 260px;
  background: var(--field-background);
  border: 1px solid var(--border);
  transition: box-shadow .15s var(--ease-smooth), border-color .15s var(--ease-smooth);
  border-radius: 10px;
}

.mention-field--boxed:focus-within {
  box-shadow: 0 0 0 2px var(--focus);
  border-color: #0000;
}

.mention-field--boxed .mention-field__mirror, .mention-field--boxed .mention-field__input {
  color: var(--field-foreground);
}

.mention-field--timeline {
  --mention-pad: 6px 8px;
  --mention-font: 13px;
  --mention-h: 60px;
  background: var(--surface);
  border-radius: 8px;
  margin-top: 6px;
}

@media (max-width: 767px) {
  .mention-field {
    --mention-font: 16px;
  }

  .mention-field--compose {
    --mention-h: 52px;
  }

  .mention-field--timeline {
    --mention-h: 72px;
  }

  .mention-field--compose.is-expanded {
    --mention-h: 84px;
  }
}

.datefield {
  align-items: center;
  width: 100%;
  min-width: 0;
  display: flex;
  position: relative;
}

.datefield__trigger {
  text-align: left;
  cursor: pointer;
  align-items: center;
  gap: 8px;
  padding-right: 30px;
  font-family: inherit;
  display: flex;
  overflow: hidden;
}

.datefield__trigger[data-empty="true"] .datefield__label {
  color: var(--field-placeholder);
}

.datefield__trigger:disabled {
  opacity: .55;
  cursor: default;
}

.datefield__icon {
  color: var(--muted);
  flex-shrink: 0;
}

.datefield__label {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.datefield__clear {
  width: 20px;
  height: 20px;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  display: inline-flex;
  position: absolute;
  right: 6px;
}

.datefield__clear:hover {
  background: var(--default);
  color: var(--foreground);
}

.datepicker-anchor {
  z-index: 9998;
  position: fixed;
}

.datepicker-scrim {
  z-index: 9997;
  background: var(--backdrop);
  animation: backdrop-in .15s var(--ease-out-fluid);
  justify-content: center;
  align-items: flex-end;
  display: flex;
  position: fixed;
  inset: 0;
}

.datepicker-sheet {
  background: var(--overlay);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--overlay-shadow);
  max-height: 92dvh;
  padding: 8px 18px calc(18px + env(safe-area-inset-bottom));
  border-top: none;
  border-radius: 20px 20px 0 0;
  overflow-y: auto;
}

.datepicker {
  background: var(--overlay);
  border: 1px solid var(--border);
  width: 300px;
  max-width: calc(100vw - 24px);
  box-shadow: var(--overlay-shadow);
  border-radius: 14px;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  display: flex;
}

.datepicker__head {
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  display: flex;
}

.datepicker__month {
  font-size: 13px;
  font-weight: 600;
}

.datepicker__weekdays, .datepicker__grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  display: grid;
}

.datepicker__weekdays span {
  text-align: center;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 10px;
  font-weight: 600;
}

.datepicker__day {
  aspect-ratio: 1;
  min-height: 32px;
  color: var(--foreground);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  background: none;
  border: none;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  transition: background .1s;
}

.datepicker__day:hover {
  background: var(--default);
}

.datepicker__day[data-outside="true"] {
  color: var(--muted);
  opacity: .5;
}

.datepicker__day[data-today="true"] {
  box-shadow: inset 0 0 0 1px var(--accent);
  font-weight: 600;
}

.datepicker__day[data-selected="true"] {
  background: var(--accent);
  color: var(--accent-foreground);
  font-weight: 600;
}

.datepicker__day[data-selected="true"]:hover {
  background: var(--accent);
}

.datepicker__time {
  border-top: 1px solid var(--separator);
  color: var(--muted);
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  display: flex;
}

.datepicker__time-part {
  background-position: right 6px center;
  flex: none;
  width: auto;
  min-width: 68px;
  padding-right: 24px;
}

.datepicker__time-sep {
  color: var(--muted);
  margin: 0 -2px;
  font-weight: 600;
}

.datepicker__time-presets {
  flex-wrap: wrap;
  gap: 4px;
  margin-left: auto;
  display: flex;
}

.datepicker__time-presets .filter-chip {
  padding: 3px 8px;
  font-size: 11px;
}

.datepicker__foot {
  border-top: 1px solid var(--separator);
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding-top: 8px;
  display: flex;
}

.datepicker__done {
  margin-left: auto;
}

@media (max-width: 767px) {
  .datepicker-sheet {
    padding: 6px 12px calc(14px + env(safe-area-inset-bottom));
  }

  .datepicker-sheet .datepicker {
    width: 100%;
    max-width: 420px;
    box-shadow: none;
    background: none;
    border: none;
    margin: 0 auto;
    padding: 4px 0;
  }

  .datepicker__day {
    aspect-ratio: auto;
    height: 42px;
    min-height: 0;
    font-size: 15px;
  }

  .datepicker__month {
    font-size: 15px;
  }

  .datepicker__time-part {
    min-width: 80px;
  }

  .datepicker__time-presets {
    width: 100%;
    margin-left: 0;
  }

  .datepicker__foot .button {
    flex: auto;
    justify-content: center;
  }
}

@media print {
  .sidebar, .topbar, .mobile-header, .tabbar, .docview__bar, .docview__note, .nav-progress, .modal-backdrop {
    display: none !important;
  }

  html, body, .app, .workspace, .workspace__main, .docview {
    background: #fff !important;
    height: auto !important;
    overflow: visible !important;
  }

  .app {
    display: block !important;
  }

  .workspace {
    padding-top: 0 !important;
  }

  .docview__scroll, .docview__pdf {
    height: auto !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .docview__page {
    box-shadow: none !important;
    color: #000 !important;
    background: #fff !important;
    border: none !important;
    border-radius: 0 !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
  }

  .docview__pdfpage {
    -moz-column-break-after: page;
    break-after: page;
    page-break-after: always;
    box-shadow: none !important;
    border: none !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .docview__pdfpage:last-child {
    -moz-column-break-after: auto;
    break-after: auto;
    page-break-after: auto;
  }

  h1, h2, h3, h4, h5, h6 {
    -moz-column-break-after: avoid;
    break-after: avoid-page;
    page-break-after: avoid;
  }

  p, li, blockquote, tr {
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  @page {
    margin: 18mm 16mm;
  }
}

.page--settings {
  max-width: none;
}

.settings-grid {
  flex-direction: column;
  gap: 18px;
  display: flex;
}

.settings-grid > a {
  text-decoration: none;
  display: block;
}

.settings-choices {
  border: 1px solid var(--border);
  background: var(--surface-secondary);
  border-radius: 10px;
  flex-wrap: wrap;
  gap: 2px;
  max-width: 100%;
  padding: 3px;
  display: inline-flex;
}

.settings-choice {
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 7px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  transition: background .12s, color .12s;
}

.settings-choice:hover {
  color: var(--foreground);
}

.settings-choice[data-active="true"] {
  background: var(--surface);
  color: var(--foreground);
  font-weight: 600;
  box-shadow: 0 1px 2px #0000000f;
}

.settings-row--split {
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  display: flex;
}

@media (max-width: 1199px) {
  .settings-row--split {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

.empty-state {
  text-align: center;
  border: 1px dashed var(--border);
  color: var(--muted);
  background: var(--surface);
  border-radius: 14px;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 44px 20px;
  font-size: 13px;
  display: flex;
}

.empty-state p {
  margin: 0;
}

.empty-state svg {
  opacity: .5;
}

.ann-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  align-items: start;
  gap: 12px;
  display: grid;
}

.ann-grid--lead {
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 12px;
}

.ann-card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--surface-shadow);
  color: inherit;
  min-width: 0;
  transition: border-color .15s var(--ease-smooth), transform .2s var(--ease-out-fluid);
  border-radius: 14px;
  gap: 12px;
  padding: 14px;
  display: flex;
  position: relative;
}

.ann-card:hover {
  border-color: var(--accent);
}

.ann-card:has(.ann-card__link:active) {
  transform: scale(.995);
}

.ann-card[data-unread="true"] {
  box-shadow: inset 3px 0 0 var(--accent), var(--surface-shadow);
}

.ann-card[data-featured="true"] {
  padding: 18px;
}

.ann-card__icon {
  background: var(--accent-soft);
  width: 32px;
  height: 32px;
  color: var(--accent);
  border-radius: 9px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  display: inline-flex;
}

.ann-card[data-featured="true"] .ann-card__icon {
  border-radius: 11px;
  width: 38px;
  height: 38px;
}

.ann-card__body {
  flex-direction: column;
  flex: 1;
  gap: 5px;
  min-width: 0;
  display: flex;
}

.ann-card__meta {
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  display: flex;
}

.ann-card__title {
  letter-spacing: -.01em;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.ann-card[data-featured="true"] .ann-card__title {
  letter-spacing: -.015em;
  font-size: 18px;
}

.ann-card__link {
  color: inherit;
  text-decoration: none;
}

.ann-card__link:after {
  content: "";
  border-radius: 14px;
  position: absolute;
  inset: 0;
}

.ann-card__link:hover {
  color: var(--accent);
}

.ann-card__excerpt {
  color: var(--muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  overflow: hidden;
}

.ann-card[data-featured="true"] .ann-card__excerpt {
  -webkit-line-clamp: 3;
  font-size: 14px;
}

.ann-card__foot {
  color: var(--muted);
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 11px;
  display: flex;
}

.ann-card__aside {
  z-index: 1;
  flex-shrink: 0;
  align-items: flex-start;
  gap: 6px;
  display: flex;
  position: relative;
}

.ann-card__dot {
  background: var(--accent);
  border-radius: 999px;
  width: 7px;
  height: 7px;
  margin-top: 10px;
}

.ann-layout {
  grid-template-columns: minmax(0, 72ch) minmax(0, 280px);
  justify-content: start;
  align-items: start;
  gap: 36px;
  display: grid;
}

@media (max-width: 1079px) {
  .ann-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .ann-rail {
    order: -1;
  }
}

.ann-rail__card {
  flex-direction: column;
  gap: 14px;
  display: flex;
}

.ann-rail__author {
  align-items: center;
  gap: 10px;
  display: flex;
}

.ann-rail__authormeta {
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
  display: flex;
}

.ann-rail__name {
  font-size: 13px;
  font-weight: 500;
}

.ann-rail__when {
  color: var(--muted);
  font-size: 11px;
}

.ann-rail__actions {
  flex-direction: column;
  gap: 6px;
  display: flex;
}

.ann-rail__actions .button {
  justify-content: flex-start;
}

.ann-rail__delete {
  color: var(--danger);
}

.ann-rail__delete:hover {
  background: var(--danger-soft);
}

.ann-article {
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  display: flex;
}

.ann-article__meta {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  display: flex;
}

.ann-article__icon {
  background: var(--accent-soft);
  width: 28px;
  height: 28px;
  color: var(--accent);
  border-radius: 8px;
  justify-content: center;
  align-items: center;
  display: inline-flex;
}

.ann-article__title {
  letter-spacing: -.022em;
  margin: 4px 0 0;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.15;
}

.ann-article__byline {
  color: var(--muted);
  margin-bottom: 10px;
  font-size: 13px;
}

.ann-body {
  color: var(--foreground);
  font-size: 15px;
  line-height: 1.65;
}

.ann-body > * {
  margin: 0;
}

.ann-body > * + * {
  margin-top: 15px;
}

.ann-body > h2 {
  letter-spacing: -.015em;
  font-size: 19px;
  font-weight: 600;
}

.ann-body > h3 {
  letter-spacing: -.01em;
  font-size: 16px;
  font-weight: 600;
}

.ann-body > * + h2 {
  margin-top: 30px;
}

.ann-body > * + h3 {
  margin-top: 24px;
}

.ann-body > h2 + *, .ann-body > h3 + * {
  margin-top: 9px;
}

.ann-body > ul {
  padding-left: 22px;
  list-style: outside;
}

.ann-body > ol {
  padding-left: 24px;
  list-style: decimal;
}

.ann-body li {
  padding-left: 2px;
}

.ann-body li::marker {
  color: var(--muted);
}

.ann-body li + li {
  margin-top: 5px;
}

.ann-body > blockquote {
  border-left: 3px solid var(--accent-soft);
  color: var(--muted);
  padding: 6px 0 6px 14px;
  font-style: italic;
}

.ann-body > .ann-rule {
  border: none;
  border-top: 1px solid var(--separator);
  margin: 24px 0;
}

.ann-code {
  font-family: var(--font-mono);
  background: var(--default);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: .88em;
}

.ann-link {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}

.ann-link:hover {
  text-decoration: underline;
}

.ann-link--external {
  align-items: baseline;
  gap: 3px;
  display: inline-flex;
}

.ann-link--external svg {
  opacity: .7;
  transform: translateY(1px);
}

.ann-figure img {
  border: 1px solid var(--border);
  background: var(--surface-secondary);
  border-radius: 12px;
  width: 100%;
  height: auto;
  display: block;
}

.ann-figure figcaption {
  color: var(--muted);
  text-align: center;
  margin-top: 6px;
  font-size: 12px;
}

.ann-composer__bodyhead {
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  display: flex;
}

.ann-composer__tools {
  align-items: center;
  gap: 4px;
  display: flex;
}

.ann-composer__textarea {
  resize: vertical;
  min-height: 200px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}

.ann-composer__preview {
  border: 1px solid var(--border);
  background: var(--surface-secondary);
  border-radius: 10px;
  min-height: 220px;
  max-height: 380px;
  padding: 14px;
  overflow-y: auto;
}

.ann-composer__empty {
  color: var(--muted);
  margin: 0;
  font-style: italic;
}

.ann-toggle {
  cursor: pointer;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  font-size: 13px;
  display: inline-flex;
}

.ann-toggle--stacked {
  align-items: flex-start;
}

.ann-toggle--stacked input {
  margin-top: 3px;
}

.ann-toggle input {
  flex-shrink: 0;
}

.ann-toggle small {
  color: var(--muted);
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.4;
  display: block;
}

.ann-composer__hint {
  color: var(--muted);
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
  margin: 6px 0 0;
  font-size: 11px;
  display: flex;
}

@media (max-width: 767px) {
  .ann-article__title {
    font-size: 25px;
  }

  .ann-body {
    font-size: 16px;
  }

  .ann-composer__textarea, .ann-composer__preview {
    min-height: 160px;
  }
}

.sheet__badge {
  background: var(--accent);
  min-width: 20px;
  height: 20px;
  color: var(--accent-foreground);
  font-variant-numeric: tabular-nums;
  border-radius: 999px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
}

.sheet__badge--quiet {
  background: var(--accent-soft);
  color: var(--accent-soft-foreground);
}

.login-or {
  color: var(--muted);
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  font-size: 12px;
  display: flex;
}

.login-or:before, .login-or:after {
  content: "";
  background: var(--separator);
  flex: 1;
  height: 1px;
}

.login-hint {
  text-align: center;
  color: var(--muted);
  margin: 10px 0 0;
  font-size: 12px;
}

.login-notice {
  margin: 0 0 16px;
}

.passkey-list {
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
}

.passkey-row {
  border-top: 1px solid var(--separator);
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  display: flex;
}

.passkey-row:first-child {
  border-top: none;
}

.passkey-row__icon {
  background: var(--accent-soft);
  width: 28px;
  height: 28px;
  color: var(--accent);
  border-radius: 8px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  display: inline-flex;
}

.passkey-row__body {
  flex-direction: column;
  flex: 1;
  min-width: 0;
  line-height: 1.3;
  display: flex;
}

.passkey-row__name {
  font-size: 13px;
  font-weight: 500;
}

.passkey-row__meta {
  color: var(--muted);
  font-size: 11px;
}

.launch {
  display: none;
}

@media (display-mode: standalone) {
  .launch {
    z-index: 10000;
    background: var(--background);
    pointer-events: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    display: flex;
    position: fixed;
    inset: 0;
  }

  .launch__mark {
    background: var(--accent);
    width: 76px;
    height: 76px;
    color: var(--accent-foreground);
    font-family: var(--font-serif);
    animation: launch-mark-in .52s var(--ease-out-fluid) both;
    border-radius: 22px;
    justify-content: center;
    align-items: center;
    font-size: 58px;
    font-weight: 700;
    line-height: .85;
    display: inline-flex;
  }

  .launch__mark span {
    transform: translateY(-3px);
  }

  .launch__word {
    letter-spacing: -.02em;
    color: var(--foreground);
    animation: launch-word-in .46s var(--ease-out-fluid) 90ms both;
    font-size: 17px;
    font-weight: 600;
  }

  .launch[data-phase="leaving"] {
    opacity: 0;
    transition: opacity .32s var(--ease-smooth), transform .32s var(--ease-out-fluid);
    will-change: opacity, transform;
    transform: scale(1.04);
  }

  @keyframes launch-mark-in {
    from {
      opacity: 0;
      transform: scale(.82);
    }

    to {
      opacity: 1;
      transform: scale(1);
    }
  }

  @keyframes launch-word-in {
    from {
      opacity: 0;
      transform: translateY(6px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .launch__mark, .launch__word {
      animation: none;
    }

    .launch[data-phase="leaving"] {
      transition: opacity .2s linear;
      transform: none;
    }
  }
}

.passkey-prompt {
  z-index: 60;
  background: var(--overlay);
  border: 1px solid var(--border);
  width: min(400px, 100vw - 40px);
  box-shadow: var(--overlay-shadow);
  animation: passkey-prompt-in .32s var(--ease-out-fluid) both;
  border-radius: 16px;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  display: flex;
  position: fixed;
  bottom: 20px;
  right: 20px;
}

@keyframes passkey-prompt-in {
  from {
    opacity: 0;
    transform: translateY(12px)scale(.98);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.passkey-prompt__icon {
  background: var(--accent-soft);
  width: 30px;
  height: 30px;
  color: var(--accent);
  border-radius: 9px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  display: inline-flex;
}

.passkey-prompt__body {
  flex-direction: column;
  flex: 1;
  gap: 3px;
  min-width: 0;
  display: flex;
}

.passkey-prompt__title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.passkey-prompt__sub {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.passkey-prompt__actions {
  flex-shrink: 0;
  align-items: center;
  gap: 4px;
  display: flex;
}

.passkey-prompt__close {
  width: 28px;
  height: 28px;
}

@media (max-width: 767px) {
  .passkey-prompt {
    width: auto;
    left: 12px;
    right: 12px;
    bottom: calc(138px + env(safe-area-inset-bottom));
    flex-wrap: wrap;
  }

  .passkey-prompt__actions {
    justify-content: flex-end;
    width: 100%;
  }

  .passkey-prompt__actions .button {
    flex: 1;
    justify-content: center;
  }

  .passkey-prompt__actions:has( > .passkey-prompt__close:only-child) {
    width: auto;
    margin-left: auto;
  }
}

.search-pill, .mailx__viewchip {
  display: none;
}

@media (max-width: 767px) {
  .search-pill {
    left: 12px;
    right: 12px;
    bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom) + 10px);
    z-index: 60;
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--surface) 78%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    height: 52px;
    box-shadow: var(--overlay-shadow);
    transition: bottom .26s var(--ease-smooth);
    border-radius: 26px;
    align-items: center;
    gap: 6px;
    padding: 0 8px 0 14px;
    display: flex;
    position: fixed;
  }

  body[data-mail-searching="true"] .search-pill {
    top: calc(var(--vv-bottom, 100vh) - 62px);
    transition: none;
    bottom: auto;
  }

  .page--search-pill, .case-tab-panel--search-pill {
    padding-bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom) + 90px) !important;
  }

  .search-pill__field {
    flex: auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
    display: flex;
    position: relative;
  }

  .search-pill__field > svg:first-child {
    color: var(--muted);
    flex-shrink: 0;
  }

  .search-pill__input {
    min-width: 0;
    height: 30px;
    box-shadow: none;
    background: none;
    border: none;
    outline: none;
    flex: auto;
    padding: 0;
    font-size: 14px;
  }

  .search-pill__input::-webkit-search-cancel-button {
    appearance: none;
    display: none;
  }

  .search-pill__input::-webkit-search-decoration {
    appearance: none;
    display: none;
  }

  .search-pill__clear {
    width: 22px;
    height: 22px;
    color: var(--muted);
    border-radius: 50%;
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
    display: inline-flex;
  }

  .search-pill__trailing {
    flex-shrink: 0;
    align-items: center;
    gap: 6px;
    display: flex;
  }

  .search-pill__chip {
    background: var(--surface-secondary);
    border: 1px solid var(--border);
    white-space: nowrap;
    border-radius: 16px;
    align-items: center;
    gap: 4px;
    max-width: 84px;
    height: 32px;
    padding: 0 10px;
    font-size: 12.5px;
    font-weight: 600;
    display: inline-flex;
  }

  .search-pill__chip span {
    text-overflow: ellipsis;
    overflow: hidden;
  }

  .search-pill:has(.search-pill__chip ~ .search-pill__chip ~ .search-pill__chip) .search-pill__chip {
    padding: 0 9px;
  }

  .search-pill:has(.search-pill__chip ~ .search-pill__chip ~ .search-pill__chip) .search-pill__chip svg {
    display: none;
  }
}

.search-pill-menu {
  z-index: 140;
  background: var(--overlay);
  border: 1px solid var(--border);
  min-width: 170px;
  max-width: 260px;
  box-shadow: var(--overlay-shadow);
  border-radius: 14px;
  flex-direction: column;
  gap: 1px;
  padding: 6px;
  display: flex;
  position: fixed;
}

.search-pill-menu__item {
  text-align: left;
  width: 100%;
  color: var(--foreground);
  border-radius: 9px;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  font-size: 13.5px;
  display: flex;
}

.search-pill-menu__item:hover {
  background: var(--surface-secondary);
}

.search-pill-menu__item[data-active="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.search-pill-menu__count {
  color: var(--muted);
  font-size: 12px;
}

.search-pill-menu__item[data-active="true"] .search-pill-menu__count {
  color: inherit;
}

.ann-imagestrip {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  display: flex;
}

.ann-imagestrip__item {
  border: 1px solid var(--border);
  background: var(--surface-secondary);
  border-radius: 10px;
  width: 88px;
  height: 66px;
  margin: 0;
  position: relative;
  overflow: hidden;
}

.ann-imagestrip__item img {
  -o-object-fit: cover;
  object-fit: cover;
  width: 100%;
  height: 100%;
  display: block;
}

.ann-imagestrip__remove {
  cursor: pointer;
  background: color-mix(in oklab, var(--eclipse) 62%, transparent);
  color: #fff;
  border: none;
  border-radius: 999px;
  justify-content: center;
  align-items: center;
  width: 20px;
  height: 20px;
  display: inline-flex;
  position: absolute;
  top: 4px;
  right: 4px;
}

.ann-imagestrip__remove:hover {
  background: var(--danger);
}

.login-page {
  background: var(--background);
  height: 100%;
  min-height: 100dvh;
  padding: calc(24px + env(safe-area-inset-top)) 24px
           calc(24px + env(safe-area-inset-bottom));
  overscroll-behavior: contain;
  justify-content: center;
  align-items: center;
  display: flex;
  overflow-y: auto;
}

.login-page__inner {
  width: 100%;
  max-width: 440px;
}

.orientation-guard {
  display: none;
}

@media (pointer: coarse) and (orientation: landscape) and (max-height: 480px) {
  .orientation-guard {
    z-index: 10000;
    text-align: center;
    background: var(--background);
    color: var(--foreground);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding: 24px;
    display: flex;
    position: fixed;
    inset: 0;
  }

  .orientation-guard__icon {
    color: var(--accent);
    animation: orientation-nudge 2.4s var(--ease-smooth) infinite;
  }

  .orientation-guard__title {
    font-size: 15px;
    font-weight: 600;
  }

  .orientation-guard__sub {
    color: var(--muted);
    max-width: 30ch;
    font-size: 13px;
  }

  .app, .login-page, .sheet-backdrop, .modal-backdrop, .inactivity-overlay, .confirm-scrim {
    visibility: hidden;
  }
}

@keyframes orientation-nudge {
  0%, 55%, 100% {
    transform: rotate(0);
  }

  70%, 85% {
    transform: rotate(-90deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .orientation-guard__icon {
    animation: none;
  }
}

.version-row__branches {
  white-space: nowrap;
  align-items: center;
  gap: 3px;
  display: inline-flex;
}

.docsource {
  grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
  align-items: stretch;
  gap: 12px;
  display: grid;
}

.upload-drop {
  flex-direction: column;
  min-width: 0;
  display: flex;
}

.upload-drop > .dropzone {
  flex: 1;
}

.docsource:has(.upload-stage) {
  grid-template-columns: minmax(0, 1fr);
}

.docsource:has(.upload-stage) > .docsource__write {
  display: none;
}

.docsource__write {
  text-align: center;
  color: var(--muted);
  border: 2px dashed var(--border);
  background: var(--surface-secondary);
  cursor: pointer;
  transition: border-color .15s var(--ease-smooth), background .15s var(--ease-smooth);
  border-radius: 14px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 26px 22px;
  font-family: inherit;
  display: flex;
}

.docsource__write:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.docsource__write:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.docsource__write > svg {
  color: var(--muted);
}

.docsource__writetitle {
  color: var(--foreground);
  font-size: 13px;
}

.docsource__writetext {
  color: var(--muted);
  max-width: 42ch;
  font-size: 13px;
  line-height: 1.45;
}

.newdoc {
  text-align: center;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  display: flex;
}

.newdoc__icon {
  background: var(--accent-soft);
  width: 40px;
  height: 40px;
  color: var(--accent);
  border-radius: 12px;
  justify-content: center;
  align-items: center;
  display: inline-flex;
}

.newdoc__title {
  font-family: var(--font-serif);
  letter-spacing: -.015em;
  margin: 0;
  font-size: 22px;
  font-style: italic;
  font-weight: 600;
}

.newdoc__sub {
  color: var(--muted);
  max-width: 44ch;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.newdoc > div {
  text-align: left;
  width: 100%;
}

.newdoc__filename {
  color: var(--muted);
  margin: 6px 0 0;
  font-size: 11.5px;
}

.newdoc__filename code {
  font-family: var(--font-mono);
  background: var(--surface-secondary);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11px;
}

.newdoc__actions {
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
  display: flex;
}

.docdrafts {
  border: 1px solid var(--border);
  background: var(--surface-secondary);
  border-radius: 14px;
  margin-top: 14px;
  padding: 12px 14px;
}

.docdrafts__head {
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
  display: flex;
}

.docdrafts__title {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
}

.docdrafts__note {
  color: var(--muted);
  font-size: 11px;
}

.docdrafts__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.docdrafts__row {
  border-top: 1px solid var(--separator);
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  display: flex;
}

.docdrafts__row:first-child {
  border-top: none;
}

.docdrafts__icon {
  color: var(--accent);
  flex-shrink: 0;
  display: inline-flex;
}

.docdrafts__body {
  flex-direction: column;
  flex: 1;
  min-width: 0;
  display: flex;
}

.docdrafts__name {
  font-size: 13px;
  font-weight: 500;
}

.docdrafts__meta {
  color: var(--muted);
  font-size: 11px;
}

.draftman {
  width: min(560px, 100%);
}

.draftman__head {
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  display: flex;
}

.draftman__state {
  color: var(--muted);
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 26px 0;
  font-size: 13px;
  display: flex;
}

.draftman__list {
  overscroll-behavior: contain;
  border-top: 1px solid var(--separator);
  max-height: 46vh;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
}

.draftman__row {
  border-bottom: 1px solid var(--separator);
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  display: flex;
}

.draftman__icon {
  color: var(--accent);
  flex-shrink: 0;
  display: inline-flex;
}

.draftman__body {
  flex-direction: column;
  flex: 1;
  min-width: 0;
  display: flex;
}

.draftman__title {
  font-size: 13px;
  font-weight: 500;
}

.draftman__meta {
  color: var(--muted);
  font-size: 11px;
}

.draftman__here {
  color: var(--muted);
  white-space: nowrap;
  background: var(--surface-secondary);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
}

.casepick {
  overscroll-behavior: contain;
  scrollbar-width: none;
  min-height: 240px;
  max-height: 42vh;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
}

.casepick::-webkit-scrollbar {
  display: none;
}

.mailx__addrlist::-webkit-scrollbar {
  display: none;
}

.casepick__row {
  -moz-column-gap: 12px;
  border: none;
  border-bottom: 1px solid var(--separator);
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
  background: none;
  border-radius: 8px;
  grid-template-columns: minmax(0, 1fr) auto 13px;
  align-items: center;
  column-gap: 12px;
  padding: 10px 6px;
  font-family: inherit;
  font-size: 13px;
  display: grid;
}

.casepick__row:hover {
  background: var(--surface-secondary);
}

.casepick__row:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.casepick__name {
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  font-weight: 500;
  overflow: hidden;
}

.casepick__sub {
  min-width: 0;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  grid-column: 1;
  margin-top: 2px;
  font-size: 11.5px;
  overflow: hidden;
}

.casepick__num {
  font-family: var(--font-mono);
  color: var(--muted);
  white-space: nowrap;
  grid-area: 1 / 2 / span 2;
  font-size: 11px;
}

.casepick__go {
  color: var(--muted);
  grid-area: 1 / 3 / span 2;
}

.casepick__row:hover .casepick__go {
  color: var(--foreground);
}

@media (max-width: 768px) {
  .docsource {
    grid-template-columns: minmax(0, 1fr);
  }

  .newdoc__actions {
    gap: 10px;
  }

  .newdoc__actions .button {
    border-radius: 12px;
    flex: 1;
    justify-content: center;
    height: 44px;
    font-size: 15px;
  }

  .draftman__row {
    flex-wrap: wrap;
  }
}

.mailx {
  background: var(--surface);
  border: 1px solid var(--border);
  min-width: 0;
  height: 100%;
  min-height: 0;
  box-shadow: var(--surface-shadow);
  isolation: isolate;
  border-radius: 16px;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  display: grid;
  overflow: hidden;
}

.mailx--page {
  height: calc(100dvh - 188px);
  min-height: 420px;
}

.mailx__list {
  scrollbar-width: none;
  border-right: 1px solid var(--separator);
  background: var(--surface);
  border-radius: 15px 0 0 15px;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  display: flex;
  overflow: hidden auto;
  container: mailx-list / inline-size;
}

.mailx__listhead {
  z-index: 2;
  background: color-mix(in oklab, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--separator);
  border-top-left-radius: 15px;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  display: flex;
  position: sticky;
  top: 0;
}

.mailx__count {
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
}

.mailx__row {
  border-bottom: 1px solid var(--separator);
  background: var(--surface);
  width: 100%;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.mailx__rowface {
  background: var(--surface);
  text-align: left;
  width: 100%;
  min-width: 0;
  color: var(--foreground);
  cursor: pointer;
  transition: background .11s var(--ease-smooth);
  touch-action: pan-y;
  border: none;
  border-left: 3px solid #0000;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 12px 11px 13px;
  font-family: inherit;
  display: flex;
  position: relative;
}

.mailx__row:hover .mailx__rowface {
  background: var(--surface-hover);
}

.mailx__row[data-unread="true"] .mailx__rowface {
  border-left-color: var(--accent);
}

.mailx__row[data-active="true"] .mailx__rowface {
  background: color-mix(in oklab, var(--accent) 6%, var(--surface));
  border-left-color: var(--accent);
}

.mailx__row[data-active="true"]:hover .mailx__rowface {
  background: color-mix(in oklab, var(--accent) 10%, var(--surface));
}

.mailx__row[data-busy="true"] {
  opacity: .45;
  pointer-events: none;
}

.mailx__hit:focus-visible, .mailx__row[data-swiping="false"] .mailx__rowface {
  transition: transform .2s var(--ease-out-fluid), background .11s var(--ease-smooth);
}

.mailx__swipe {
  background: var(--warning-soft);
  color: var(--warning-soft-foreground);
  pointer-events: none;
  align-items: center;
  gap: 7px;
  padding: 0 20px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  position: absolute;
  inset: 0 0 0 auto;
}

.mailx__swipe[data-unarchiving="true"] {
  background: var(--accent-soft);
  color: var(--accent-soft-foreground);
}

.mailx__check {
  margin-top: 3px;
}

.mailx__hit {
  min-width: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
  flex: 1;
  align-items: flex-start;
  gap: 11px;
  padding: 0;
  font-family: inherit;
  display: flex;
}

.mailx__body {
  flex: 1;
  min-width: 0;
}

.mailx__line {
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  display: flex;
}

.mailx__who {
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.35;
  overflow: hidden;
}

.mailx__row[data-unread="true"] .mailx__who {
  font-weight: 650;
}

.mailx__msgcount {
  background: var(--default);
  min-width: 17px;
  height: 15px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  vertical-align: 1px;
  border-radius: 999px;
  justify-content: center;
  align-items: center;
  margin-left: 6px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 600;
  display: inline-flex;
}

.mailx__wholabel {
  color: var(--muted);
  font-weight: 400;
}

.mailx__when {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  font-size: 11px;
}

.mailx__subject {
  min-width: 0;
  color: var(--foreground);
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.4;
  display: block;
  overflow: hidden;
}

.mailx__row[data-unread="true"] .mailx__subject {
  font-weight: 600;
}

.mailx__dot-unread {
  background: var(--accent);
  vertical-align: 1px;
  border-radius: 50%;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  display: inline-block;
}

.mailx__snippet {
  -webkit-line-clamp: 2;
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.42;
  display: -webkit-box;
  overflow: hidden;
}

.mailx__tags {
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-width: 0;
  margin-top: 6px;
  display: flex;
}

.mailx__tags .chip {
  text-overflow: ellipsis;
  max-width: 100%;
  overflow: hidden;
}

.mailx__search {
  flex: 1;
  align-items: center;
  min-width: 0;
  display: flex;
  position: relative;
}

.mailx__search .input {
  height: 32px;
  font-size: 13px;
}

.mailx__search > svg:first-child {
  color: var(--muted);
  pointer-events: none;
  position: absolute;
  left: 11px;
}

.mailx__search .input {
  padding-left: 32px;
  padding-right: 30px;
}

.mailx__searchclear {
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 999px;
  padding: 4px;
  display: inline-flex;
  position: absolute;
  right: 6px;
}

.mailx__searchclear:hover {
  background: var(--default);
  color: var(--foreground);
}

.mailx__detail {
  background: var(--background);
  border-radius: 0 15px 15px 0;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.mailx__scroll {
  scrollbar-width: none;
  flex: 1;
  min-height: 0;
  overflow: hidden auto;
}

.mailx__list::-webkit-scrollbar {
  display: none;
}

.mailx__scroll::-webkit-scrollbar {
  display: none;
}

.mailx__empty {
  color: var(--muted);
  text-align: center;
  flex-direction: column;
  flex: 1;
  justify-content: center;
  align-items: center;
  gap: 9px;
  padding: 44px 28px;
  font-size: 13px;
  display: flex;
}

.mailx__empty > svg {
  opacity: .45;
}

.mailx__empty strong {
  color: var(--foreground);
  font-size: 14px;
  font-weight: 600;
}

.mailx__emptyhint {
  max-width: 34ch;
  font-size: 12.5px;
  line-height: 1.55;
}

.mailx__emptyhint kbd {
  border: 1px solid var(--border);
  background: var(--surface-secondary);
  font-family: var(--font-mono);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 10.5px;
}

.mailx__empty--list {
  min-height: 220px;
}

.mailx__head {
  z-index: 2;
  background: color-mix(in oklab, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--separator);
  min-width: 0;
  padding: 18px 22px 14px;
  position: sticky;
  top: 0;
}

.mailx__headtop {
  align-items: center;
  gap: 10px;
  min-width: 0;
  display: flex;
}

.mailx__title {
  min-width: 0;
  font-family: var(--font-serif);
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
  flex: 1;
  margin: 0;
  font-size: 21px;
  font-style: italic;
  font-weight: 600;
  line-height: 1.2;
}

.mailx__meta {
  min-width: 0;
  color: var(--muted);
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  display: flex;
}

.mailx__meta > span {
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
}

.mailx__dot {
  opacity: .5;
}

.mailx__metaclip {
  flex-shrink: 0;
  align-items: center;
  gap: 4px;
  display: inline-flex;
}

[hidden] {
  display: none !important;
}

.timeline-event__title--icon {
  align-items: center;
  gap: 5px;
  min-width: 0;
  display: flex;
}

.mailx__discard:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

.mailx__draftstate {
  color: var(--muted);
  white-space: nowrap;
  margin-left: auto;
  padding-right: 4px;
  font-size: 11.5px;
}

.mailx__msgacts {
  opacity: .45;
  transition: opacity .13s var(--ease-smooth);
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  display: flex;
}

.mailx__msg:hover .mailx__msgacts, .mailx__msgacts:focus-within {
  opacity: 1;
}

@media (hover: none) {
  .mailx__msgacts {
    opacity: 1;
  }
}

.mailx__msgactsto {
  min-width: 0;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  overflow: hidden;
}

.mailx__messages {
  min-width: 0;
  padding: 0 0 24px;
}

.mailx__msg {
  --msg-pad: 22px;
  border-bottom: 1px solid var(--separator);
  min-width: 0;
  padding: 0;
}

.mailx__msg:last-child {
  border-bottom: none;
}

.mailx__msghead {
  width: 100%;
  min-width: 0;
  padding: 14px var(--msg-pad);
  color: inherit;
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
  align-items: flex-start;
  gap: 11px;
  font-family: inherit;
  display: flex;
}

.mailx__msghead:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
  border-radius: 8px;
}

.mailx__msgwho {
  flex: 1;
  min-width: 0;
}

.mailx__from {
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  display: block;
  overflow: hidden;
}

.mailx__fromnote {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 400;
}

.mailx__to {
  min-width: 0;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 1px;
  font-size: 11.5px;
  display: block;
  overflow: hidden;
}

.mailx__preview {
  min-width: 0;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 2;
  font-size: 12px;
  overflow: hidden;
}

.mailx__msgtime {
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 11.5px;
}

.mailx__msgtime--short {
  display: none;
}

.mailx__msgclip {
  background: var(--default);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  border-radius: 999px;
  flex-shrink: 0;
  align-items: center;
  gap: 3px;
  padding: 1px 6px 1px 5px;
  font-size: 10.5px;
  font-weight: 600;
  display: inline-flex;
}

.mailx__msgchevron {
  color: var(--muted);
  opacity: 0;
  transition: opacity .13s var(--ease-smooth), transform .16s var(--ease-smooth);
  flex-shrink: 0;
}

.mailx__msghead:hover .mailx__msgchevron, .mailx__msghead:focus-visible .mailx__msgchevron {
  opacity: .75;
}

.mailx__msg[data-expanded="true"] .mailx__msgchevron {
  transform: rotate(180deg);
}

@media (hover: none) {
  .mailx__msgchevron {
    opacity: .55;
  }
}

.mailx__content {
  min-width: 0;
  padding: 14px var(--msg-pad) 20px calc(var(--msg-pad) + 47px);
}

@media (max-width: 560px) {
  .mailx__content {
    padding-left: var(--msg-pad);
  }
}

.mailx__html {
  min-width: 0;
  color: var(--foreground);
  overflow-wrap: anywhere;
  font-size: 13.5px;
  line-height: 1.65;
}

.mailx__html img {
  max-width: 100%;
  height: auto;
}

.mailx__html a {
  color: var(--link);
}

.mailx__html p {
  margin: 0 0 10px;
}

.mailx__html > :last-child {
  margin-bottom: 0;
}

.mailx__html ul, .mailx__html ol {
  margin: 0 0 10px;
  padding-left: 22px;
}

.mailx__html blockquote {
  border-left: 2px solid var(--border);
  color: var(--muted);
  margin: 10px 0;
  padding: 2px 0 2px 12px;
}

.mailx__html pre {
  white-space: pre-wrap;
  font-family: var(--font-mono);
  background: var(--surface-secondary);
  border-radius: 8px;
  padding: 10px;
  font-size: 12px;
  overflow-x: auto;
}

.mailx__html code {
  font-family: var(--font-mono);
  font-size: 12px;
}

.mailx__html table {
  border-collapse: collapse;
  max-width: 100%;
  display: block;
  overflow-x: auto;
}

.mailx__html td, .mailx__html th {
  padding: 5px 8px;
  font-size: 12.5px;
}

.mailx__html img[data-mail-src]:not([src]) {
  display: none;
}

.mailx__quoted {
  border-top: 1px dashed var(--border);
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-top: 12px;
  padding-top: 12px;
  font-size: 12.5px;
  line-height: 1.55;
}

.mailx__atts {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0 0 14px;
  display: flex;
}

.mailx__att {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  align-items: center;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
  padding: 5px 6px 5px 4px;
  font-size: 12px;
  transition: border-color .12s, background .12s;
  display: inline-flex;
}

.mailx__att:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
}

.mailx__attopen {
  min-width: 0;
  max-width: 260px;
  color: inherit;
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 7px;
  align-items: center;
  gap: 8px;
  padding: 3px 4px 3px 6px;
  font-family: inherit;
  font-size: 12px;
  display: flex;
}

.mailx__atticon {
  color: var(--muted);
  flex-shrink: 0;
}

.mailx__attbody {
  align-items: baseline;
  gap: 7px;
  min-width: 0;
  display: flex;
}

.mailx__attname {
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  font-weight: 500;
  display: block;
  overflow: hidden;
}

.mailx__attsize {
  color: var(--muted);
  flex-shrink: 0;
  font-size: 11px;
}

.mailx__attacts {
  flex-shrink: 0;
  align-items: center;
  gap: 1px;
  display: inline-flex;
}

.mailx__attact {
  color: var(--accent);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 7px;
  flex-shrink: 0;
  padding: 5px;
  display: inline-flex;
}

.mailx__attact:hover {
  background: var(--accent-soft);
}

.mailx__attact:disabled {
  opacity: .5;
  cursor: default;
}

.attpreview {
  z-index: 150;
  background: var(--background);
  animation: attpreview-in .16s var(--ease-out-fluid);
  flex-direction: column;
  display: flex;
  position: fixed;
  inset: 0;
}

@keyframes attpreview-in {
  from {
    opacity: 0;
    transform: scale(.995);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.attpreview__bar {
  min-width: 0;
  padding: 10px 14px;
  padding-top: calc(10px + env(safe-area-inset-top));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  display: flex;
}

.attpreview__name {
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  font-size: 13px;
  font-weight: 550;
  display: block;
  overflow: hidden;
}

.attpreview__size {
  color: var(--muted);
  flex-shrink: 0;
  font-size: 11.5px;
}

.attpreview__body {
  overscroll-behavior: contain;
  min-height: 0;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  flex: 1;
  overflow-y: auto;
}

.attpreview__state {
  min-height: 50vh;
  color: var(--muted);
  text-align: center;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  display: flex;
}

.attpreview__state--error {
  color: var(--danger);
}

.attpreview__image {
  border-radius: 10px;
  max-width: min(100%, 1100px);
  margin: 0 auto;
  display: block;
}

.attpreview__pdf {
  flex-direction: column;
  align-items: center;
  gap: 14px;
  display: flex;
}

.attpreview__pdf canvas {
  border-radius: 6px;
  max-width: 100%;
  height: auto;
  box-shadow: 0 4px 18px -6px #00000040;
}

@media (max-width: 560px) {
  .attpreview__savelabel {
    display: none;
  }

  .attpreview__body {
    padding: 12px 10px calc(12px + env(safe-area-inset-bottom));
  }
}

.mailx__actions {
  z-index: 3;
  background: var(--surface);
  border-top: 1px solid var(--separator);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 12px 22px;
  display: flex;
  position: sticky;
  bottom: 0;
}

.mailx__filebar {
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  display: flex;
}

.mailx__filemain {
  flex: 0 auto;
  min-width: 0;
  max-width: 100%;
}

.mailx__filelabel {
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  display: block;
  overflow: hidden;
}

.mailx__filelabel strong {
  font-weight: 650;
}

.mailx__filealt {
  flex: none;
}

.mailx__filespacer {
  flex: auto;
  min-width: 0;
}

.mailx__filearchive {
  flex: none;
}

.mailx__compose {
  flex-direction: column;
  min-width: 0;
  display: flex;
}

.mailx__field {
  border-bottom: 1px solid var(--separator);
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 9px 0;
  display: flex;
}

.mailx__fieldlabel {
  width: 52px;
  color: var(--muted);
  flex-shrink: 0;
  padding-top: 6px;
  font-size: 12px;
  font-weight: 500;
}

.mailx__chips {
  flex-wrap: wrap;
  flex: 1;
  align-items: center;
  gap: 5px;
  min-width: 0;
  display: flex;
  position: relative;
}

.mailx__entry {
  min-width: 140px;
  color: var(--foreground);
  background: none;
  border: none;
  outline: none;
  flex: 1;
  padding: 5px 0;
  font-family: inherit;
  font-size: 13.5px;
}

.mailx__entry::placeholder {
  color: var(--field-placeholder);
}

.mailx__editor {
  resize: none;
  width: 100%;
  min-height: 168px;
  color: var(--foreground);
  background: none;
  border: none;
  outline: none;
  padding: 14px 0 10px;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.65;
}

.mailx__richbody {
  flex-direction: column;
  min-height: 168px;
  display: flex;
}

.mailx__editortoolbar {
  border-bottom: 1px solid var(--separator);
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px 0 8px;
  display: flex;
}

.mailx__editorbtn {
  width: 26px;
  height: 26px;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 5px;
  justify-content: center;
  align-items: center;
  display: inline-flex;
}

.mailx__editorbtn:hover {
  background: var(--default);
  color: var(--foreground);
}

.mailx__editorbtn[data-active="true"] {
  background: var(--accent-soft);
  color: var(--accent);
}

.mailx__editorbody {
  color: var(--foreground);
  outline: none;
  flex: 1;
  padding: 10px 0;
  font-size: 13.5px;
  line-height: 1.65;
}

.mailx__richbody--loading .mailx__editortoolbar {
  height: 39px;
}

.mailx__richbody--loading .mailx__editorbody {
  min-height: 129px;
}

.mailx__editorbody p {
  margin: 0 0 .6em;
}

.mailx__editorbody img {
  border-radius: 6px;
  max-width: 100%;
}

.mailx__editorbody blockquote {
  border-left: 2px solid var(--separator);
  color: var(--muted);
  margin: .4em 0;
  padding-left: 10px;
}

.mailx__editorbody p.is-editor-empty:first-child:before {
  content: attr(data-placeholder);
  color: var(--field-placeholder);
  float: left;
  pointer-events: none;
  height: 0;
}

@media (max-width: 640px) {
  .mailx__editortoolbar {
    gap: 4px;
  }

  .mailx__editorbtn {
    width: 30px;
    height: 30px;
  }
}

.mailx__composefoot {
  border-top: 1px solid var(--separator);
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 12px 14px;
  display: flex;
}

.mailx__composefoot .button {
  height: 34px;
}

.mailx__recip {
  background: var(--default);
  border-radius: 999px;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  padding: 3px 4px 3px 10px;
  font-size: 12px;
  display: inline-flex;
}

.mailx__recip[data-unknown="true"] {
  background: var(--warning-soft);
  color: var(--warning-soft-foreground);
}

.mailx__recipname {
  flex-shrink: 0;
  font-weight: 500;
}

.mailx__recipaddr {
  min-width: 0;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  overflow: hidden;
}

.mailx__recipx {
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 999px;
  flex-shrink: 0;
  padding: 2px;
  display: inline-flex;
}

.mailx__recipx:hover {
  background: var(--surface-tertiary);
  color: var(--foreground);
}

.mailx__suggest {
  z-index: 20;
  border: 1px solid var(--border);
  background: var(--overlay);
  max-height: 210px;
  box-shadow: var(--overlay-shadow);
  border-radius: 10px;
  margin-top: 4px;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  overflow-y: auto;
}

.mailx__option {
  width: 100%;
  min-width: 0;
  color: var(--foreground);
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 8px;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  font-family: inherit;
  font-size: 13px;
  display: flex;
}

.mailx__option[data-active="true"], .mailx__option:hover {
  background: var(--default);
}

.mailx__option > span {
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
}

.mailx__replyactions {
  min-width: 0;
  margin: var(--mail-foot-gap, 16px) 0 8px;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  display: flex;
}

.mailx__replyto {
  min-width: 0;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  overflow: hidden;
}

.mailx__panel {
  min-width: 0;
  margin: var(--mail-foot-gap, 16px) 0 8px;
  border: 1px solid var(--border-secondary);
  background: var(--surface);
  box-shadow: var(--surface-shadow);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}

.mailx__panelhead {
  border-bottom: 1px solid var(--separator);
  background: var(--surface-secondary);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px 14px;
  display: flex;
}

.mailx__paneltitle {
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  overflow: hidden;
}

.mailx__panelbody {
  padding: 2px 14px 14px;
}

.mailx__from-select {
  min-width: 0;
  max-width: 100%;
  height: 28px;
  color: var(--foreground);
  cursor: pointer;
  background: none;
  border: 1px solid #0000;
  border-radius: 8px;
  padding: 0 26px 0 8px;
  font-family: inherit;
  font-size: 13px;
}

.mailx__from-select:hover {
  border-color: var(--border);
  background: var(--field-background);
}

.attachpick__panel {
  border: 1px solid var(--border);
  background: var(--surface-secondary);
  transform-origin: bottom;
  border-radius: 12px;
  margin: 0 14px 4px;
  animation: .14s ease-out attachpick-in;
  overflow: hidden;
}

@keyframes attachpick-in {
  from {
    opacity: 0;
    transform: scaleY(.96)translateY(2px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .attachpick__panel {
    animation: none;
  }
}

.attachpick {
  flex-direction: column;
  min-height: 0;
  display: flex;
}

.attachpick__head {
  border-bottom: 1px solid var(--separator);
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px;
  display: flex;
}

.attachpick__search {
  flex: 190px;
}

.attachpick__rail {
  flex-shrink: 0;
  align-items: center;
  gap: 4px;
  display: flex;
}

.attachpick__railbtn {
  border: 1px solid var(--border);
  background: var(--surface);
  height: 32px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  border-radius: 9px;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  font-family: inherit;
  font-size: 12px;
  display: inline-flex;
}

@media (hover: hover) and (pointer: fine) {
  .attachpick__railbtn:hover {
    color: var(--foreground);
    border-color: var(--border-strong, var(--border));
  }
}

.attachpick__railbtn:active {
  color: var(--foreground);
  border-color: var(--border-strong, var(--border));
}

.attachpick__railbtn[data-active="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: #0000;
  font-weight: 500;
}

.attachpick__list {
  overscroll-behavior: contain;
  flex: auto;
  min-height: 200px;
  max-height: 268px;
  padding: 4px;
  overflow-y: auto;
}

.attachpick__note {
  color: var(--muted);
  margin: 0;
  padding: 10px 8px;
  font-size: 12px;
}

.attachpick__doc {
  border-radius: 9px;
  position: relative;
}

.attachpick__doc[data-on="true"] {
  background: var(--accent-soft);
}

.attachpick__row {
  cursor: pointer;
  border-radius: 9px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
  padding: 8px 40px 8px 8px;
  display: flex;
}

@media (hover: hover) and (pointer: fine) {
  .attachpick__row:hover {
    background: var(--default);
  }

  .attachpick__doc[data-on="true"] .attachpick__row:hover {
    background: none;
  }
}

.attachpick__row:active {
  background: var(--default);
}

.attachpick__doc[data-on="true"] .attachpick__row:active {
  background: none;
}

.attachpick__mark {
  color: var(--muted);
  flex-shrink: 0;
}

.attachpick__doc[data-on="true"] .attachpick__mark {
  color: var(--accent);
}

.attachpick__body {
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  display: flex;
}

.attachpick__title {
  color: var(--foreground);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  overflow: hidden;
}

.attachpick__meta {
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  overflow: hidden;
}

.attachpick__hist {
  height: 26px;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 7px;
  align-items: center;
  gap: 1px;
  padding: 0 5px;
  display: inline-flex;
  position: absolute;
  top: 6px;
  right: 6px;
}

@media (hover: hover) and (pointer: fine) {
  .attachpick__hist:hover {
    background: var(--surface);
    color: var(--foreground);
  }
}

.attachpick__hist:active {
  background: var(--surface);
  color: var(--foreground);
}

.attachpick__caret {
  transition: transform .14s var(--ease-smooth);
}

.attachpick__caret[data-open="true"] {
  transform: rotate(180deg);
}

.attachpick__versions {
  background: var(--surface);
  border: 1px solid var(--border);
  animation: attachpick-versions-in .16s var(--ease-out-quart) both;
  transform-origin: top;
  border-radius: 9px;
  flex-direction: column;
  gap: 1px;
  margin: 0 8px 8px 31px;
  padding: 4px;
  display: flex;
}

@keyframes attachpick-versions-in {
  from {
    opacity: 0;
    transform: translateY(-4px)scaleY(.92);
  }

  to {
    opacity: 1;
    transform: translateY(0)scaleY(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .attachpick__versions {
    animation: none;
  }
}

.attachpick__version {
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 7px;
  flex-direction: column;
  gap: 1px;
  padding: 6px 8px;
  font-family: inherit;
  display: flex;
}

@media (hover: hover) and (pointer: fine) {
  .attachpick__version:hover {
    background: var(--default);
  }
}

.attachpick__version:active {
  background: var(--default);
}

.attachpick__version[data-active="true"] {
  background: var(--accent-soft);
}

.attachpick__vnum {
  color: var(--foreground);
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
}

.attachpick__vmaster {
  background: var(--accent);
  color: #fff;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 1px 5px;
  font-size: 9px;
  font-weight: 600;
}

.attachpick__vmeta {
  color: var(--muted);
  align-items: center;
  gap: 4px;
  font-size: 11px;
  display: inline-flex;
}

@media (max-width: 767px) {
  .attachpick__list {
    max-height: 46vh;
  }

  .attachpick__head {
    border-bottom: none;
    padding: 0 0 8px;
  }

  .attachpick__rail {
    width: 100%;
  }

  .attachpick__railbtn {
    flex: 1;
    justify-content: center;
    height: 38px;
  }

  .attachpick__row {
    padding: 10px 44px 10px 8px;
  }

  .attachpick__hist {
    justify-content: center;
    width: 36px;
    height: 36px;
    top: 4px;
    right: 4px;
  }

  .attachpick__version {
    padding: 10px 8px;
  }
}

.mailx__atts--compose {
  margin: 0 0 10px;
}

.mailx__att[data-state="failed"] {
  border-color: var(--danger);
}

.mailx__att[data-state="uploading"] {
  opacity: .75;
}

.mailx__attfile {
  color: var(--muted);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  border-radius: 7px;
  flex-shrink: 0;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 500;
  display: inline-flex;
}

.mailx__attfile:hover {
  background: var(--default);
  color: var(--foreground);
}

.mailx__attfile:has(input:checked) {
  color: var(--accent);
}

.mailx__drop {
  z-index: 4;
  border: 2px dashed var(--accent);
  background: color-mix(in oklab, var(--accent) 8%, var(--surface));
  color: var(--accent);
  pointer-events: none;
  border-radius: 12px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  position: absolute;
  inset: 4px;
}

.mailx__quotefold {
  margin-top: 4px;
}

.mailx__editor--quoted {
  border: 1px solid var(--separator);
  background: var(--surface-secondary);
  min-height: 120px;
  color: var(--muted);
  border-radius: 10px;
  margin-top: 8px;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.55;
}

.mailx__composepane {
  background: var(--background);
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
}

.mailx__composepane .mailx__panel {
  flex-direction: column;
  flex: 1;
  min-height: 0;
  margin: 16px;
  display: flex;
}

.mailx__composepane .mailx__panelbody {
  flex-direction: column;
  flex: auto;
  min-height: 0;
  display: flex;
  overflow-y: auto;
}

.mailx__composepane .mailx__editor {
  flex: 1;
}

.mailx__composepane .mailx__richbody {
  flex: 1;
  min-height: 0;
}

.mailx__composepane .mailx__editorbody {
  flex: 1;
}

@media (max-width: 767px) {
  .mailx__panel {
    margin: var(--mail-foot-gap, 16px) 0 10px;
    border-radius: 12px;
    flex-direction: column;
    min-height: 0;
    display: flex;
  }

  .mailx__panelbody {
    flex: auto;
    min-height: 0;
    overflow-y: auto;
  }

  .mailx__composefoot {
    background: var(--surface);
  }

  .mailx__composepane {
    z-index: 120;
    background: var(--surface);
    padding-top: env(safe-area-inset-top);
    position: fixed;
    inset: 0;
  }

  .mailx__composepane .mailx__panel {
    margin: 12px 12px calc(12px + var(--tabbar-height) + env(safe-area-inset-bottom));
  }
}

.newmatter__addrs {
  border: 1px solid var(--border);
  background: var(--surface-secondary);
  border-radius: 10px;
  flex-direction: column;
  gap: 2px;
  max-height: 168px;
  padding: 4px;
  display: flex;
  overflow-y: auto;
}

.newmatter__addr {
  align-items: center;
  gap: 8px;
  min-width: 0;
  display: flex;
}

.newmatter__pick {
  min-width: 0;
  color: var(--foreground);
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 8px;
  flex: 1;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  font-family: inherit;
  font-size: 13px;
  display: flex;
}

.newmatter__pick:hover {
  background: var(--surface);
}

.newmatter__pick:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.newmatter__email {
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
}

.mailx__addrpending {
  min-height: 204px;
}

.mailx__addrlist {
  overscroll-behavior: contain;
  scrollbar-width: none;
  border: 1px solid var(--border);
  background: var(--surface-secondary);
  border-radius: 12px;
  flex-direction: column;
  min-width: 0;
  min-height: 204px;
  max-height: 204px;
  display: flex;
  overflow-y: auto;
}

.mailx__addr {
  border-top: 1px solid var(--separator);
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  display: flex;
}

.mailx__addr:first-of-type {
  border-top: none;
}

.mailx__addrbody {
  flex: 1;
  min-width: 0;
}

.mailx__addrmain {
  overflow-wrap: anywhere;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  display: flex;
}

.mailx__addrmain .chip {
  font-size: 10px;
}

.mailx__addrmeta {
  color: var(--muted);
  overflow-wrap: anywhere;
  margin-top: 2px;
  font-size: 11px;
}

.mailx__addrmeta--warn {
  color: var(--warning-soft-foreground);
}

.mailx__addrmeta--warn a {
  color: inherit;
}

.mailx__addrremove {
  color: var(--danger);
}

.mailx__addrempty {
  color: var(--muted);
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
}

@media (max-width: 767px) {
  .mailx {
    border: 1px solid var(--border);
    border-radius: 14px;
    height: auto;
    display: block;
    overflow: visible;
  }

  .mailx--page {
    height: auto;
    min-height: 0;
  }

  .mailx__list {
    border-right: none;
    overflow: visible;
  }

  .mailx[data-detail-open="true"] .mailx__list {
    display: none;
  }

  .mailx__listhead {
    left: 12px;
    right: 12px;
    bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom) + 10px);
    z-index: 60;
    border: 1px solid var(--border);
    height: 52px;
    transition: bottom .26s var(--ease-smooth);
    background: color-mix(in oklab, var(--surface) 78%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    box-shadow: var(--overlay-shadow);
    border-radius: 26px;
    gap: 6px;
    padding: 0 8px 0 14px;
    position: fixed;
    top: auto;
  }

  .mailx__listhead .mailx__search > svg:first-child {
    left: 1px;
  }

  .mailx__listhead .mailx__search .input {
    height: 30px;
    box-shadow: none;
    background: none;
    border: none;
    padding-left: 23px;
  }

  .mailx__listhead-shortcuts[data-collapsed="true"] {
    margin-right: -6px;
  }

  .mailx__rows, .mailx__empty--list {
    padding-bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom) + 72px);
  }

  .mailx__rows > :first-child:not(.mailx__group), .mailx__rows > :first-child:not(.mailx__group) .mailx__row {
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
  }

  .mailx[data-detail-open="true"] .mailx__listhead, .mailx[data-composing="true"] .mailx__listhead, body[data-mail-reading="true"] .mailx__listhead {
    display: none;
  }

  body[data-mail-searching="true"] .mailx__listhead {
    top: calc(var(--vv-bottom, 100vh) - 62px);
    transition: none;
    bottom: auto;
  }

  .mailx[data-detail-open="true"] .mailx__rows, .mailx[data-composing="true"] .mailx__rows {
    padding-bottom: 0;
  }

  .mailx[data-composing="true"] .mailx__list {
    display: none;
  }

  .mailx__detail {
    z-index: 120;
    background: var(--surface);
    animation: mailx-push-in .24s var(--ease-out-fluid);
    border-radius: 0;
    position: fixed;
    inset: 0;
  }

  .mailx:not([data-detail-open="true"]) .mailx__detail {
    display: none;
  }

  .mailx__head {
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top));
  }

  .mailx__title {
    font-size: 18px;
  }

  .mailx__msg {
    --msg-pad: 16px;
  }

  .mailx__messages {
    padding-bottom: 12px;
  }

  .mailx__filebar {
    gap: 6px;
  }

  .mailx__filemain, .mailx__filealt, .mailx__filearchive {
    border-radius: 12px;
  }

  .mailx__filemain {
    flex: auto;
    height: 42px;
    font-size: 13.5px;
  }

  .mailx__filealt {
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
  }

  .mailx__filealtlabel, .mailx__filespacer {
    display: none;
  }

  .mailx__filearchive {
    width: 42px;
    height: 42px;
  }

  .mailx__actions {
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    gap: 8px;
  }
}

@keyframes mailx-push-in {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mailx__detail {
    animation: none;
  }
}

.mailx__tabs {
  background: var(--surface-secondary);
  border-bottom: 1px solid var(--border);
  overscroll-behavior-x: none;
  touch-action: pan-x;
  scrollbar-width: none;
  border-radius: 15px 15px 0 0;
  grid-column: 1 / -1;
  align-items: center;
  gap: 2px;
  min-width: 0;
  padding: 0 10px;
  display: flex;
  overflow: auto hidden;
}

.mailx__tabs::-webkit-scrollbar {
  display: none;
}

.mailx__tabs > * {
  flex: none;
}

.mailx__tabspacer {
  flex: auto;
  min-width: 8px;
}

.mailx__tab {
  height: 42px;
  color: var(--muted);
  cursor: pointer;
  transition: color .12s var(--ease-smooth);
  background: none;
  border: none;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  position: relative;
}

.mailx__tab:hover {
  color: var(--foreground);
}

.mailx__tab:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -3px;
  border-radius: 8px;
}

.mailx__tab:after {
  content: "";
  height: 2px;
  transition: background .14s var(--ease-smooth);
  background: none;
  border-radius: 2px 2px 0 0;
  position: absolute;
  bottom: -1px;
  left: 10px;
  right: 10px;
}

.mailx__tab[data-active="true"] {
  color: var(--foreground);
  font-weight: 600;
}

.mailx__tab[data-active="true"]:after {
  background: var(--accent);
}

.mailx__tabcount {
  background: var(--default);
  min-width: 18px;
  height: 17px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  border-radius: 999px;
  justify-content: center;
  align-items: center;
  padding: 0 5px;
  font-size: 10.5px;
  font-weight: 600;
  display: inline-flex;
}

.mailx__tab[data-active="true"] .mailx__tabcount {
  background: var(--accent-soft);
  color: var(--accent-soft-foreground);
}

.mailx__syncing {
  color: var(--muted);
  white-space: nowrap;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  font-size: 11.5px;
  display: inline-flex;
}

.mailx--tabbed {
  grid-template-rows: auto minmax(0, 1fr);
}

@media (min-width: 768px) {
  .mailx--tabbed .mailx__list {
    border-top-left-radius: 0;
  }

  .mailx--tabbed .mailx__detail {
    border-top-right-radius: 0;
  }

  .mailx--tabbed .mailx__listhead {
    border-top-left-radius: 0;
  }
}

.mailx__listhead {
  gap: 8px;
}

.mailx__listbar {
  border-bottom: 1px solid var(--separator);
  background: var(--surface-secondary);
  min-width: 0;
  height: 32px;
  transition: background .13s var(--ease-smooth);
  flex-wrap: nowrap;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 12px;
  display: flex;
}

.mailx__listbar[data-selecting="true"] {
  background: color-mix(in oklab, var(--accent) 8%, var(--surface));
}

.mailx__selectall {
  cursor: pointer;
  flex-shrink: 0;
  align-items: center;
  gap: 9px;
  min-width: 0;
  display: flex;
}

.mailx__selspacer {
  flex: auto;
  min-width: 4px;
}

.mailx__selcount {
  background: var(--accent);
  min-width: 20px;
  height: 19px;
  color: var(--accent-foreground);
  font-variant-numeric: tabular-nums;
  border-radius: 999px;
  justify-content: center;
  align-items: center;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
}

.mailx__selacts {
  flex-shrink: 1;
  align-items: center;
  gap: 2px;
  min-width: 0;
  display: flex;
}

.mailx__selact {
  height: 22px;
  color: var(--foreground);
  white-space: nowrap;
  cursor: pointer;
  transition: background .11s var(--ease-smooth);
  background: none;
  border: none;
  border-radius: 8px;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  display: inline-flex;
}

.mailx__selact:hover {
  background: var(--default);
}

.mailx__selact--primary {
  background: var(--accent);
  color: var(--accent-foreground);
  font-weight: 600;
}

.mailx__selact--primary:hover {
  background: var(--accent-hover, var(--accent));
  filter: brightness(1.06);
}

.mailx__selact--clear {
  color: var(--muted);
  padding: 0 7px;
}

.mailx__selact--clear:hover {
  color: var(--foreground);
}

@container mailx-list (max-width: 420px) {
  .mailx__selact:not(.mailx__selact--primary) .mailx__selactlabel {
    display: none;
  }

  .mailx__selact:not(.mailx__selact--primary) {
    padding: 0 7px;
  }
}

@container mailx-list (max-width: 330px) {
  .mailx__selactlabel {
    display: none;
  }

  .mailx__selact {
    padding: 0 7px;
  }
}

.mailx__rows {
  min-width: 0;
}

.mailx__group {
  z-index: 2;
  background: var(--surface-secondary);
  border-bottom: 1px solid var(--separator);
  border-top: 1px solid var(--separator);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 7px 14px 6px;
  font-size: 10.5px;
  font-weight: 600;
  position: sticky;
  top: 52px;
}

.mailx__more {
  color: var(--muted);
  justify-content: center;
  align-items: center;
  gap: 9px;
  padding: 18px;
  font-size: 12px;
  display: flex;
}

.mailx__quick {
  background: none;
  border-radius: 10px;
  align-items: center;
  gap: 2px;
  display: none;
  position: absolute;
  top: 7px;
  right: 8px;
}

@media (hover: hover) and (pointer: fine) {
  .mailx__when {
    transition: opacity .11s var(--ease-smooth);
  }

  .mailx__row:hover .mailx__when, .mailx__row:focus-within .mailx__when {
    opacity: 0;
  }

  .mailx__row:hover .mailx__quick, .mailx__row:focus-within .mailx__quick {
    display: flex;
  }
}

.mailx__quickbtn {
  background: var(--surface);
  width: 30px;
  height: 30px;
  color: var(--muted);
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--border);
  transition: background .1s var(--ease-smooth), color .1s var(--ease-smooth);
  border: none;
  border-radius: 9px;
  justify-content: center;
  align-items: center;
  display: inline-flex;
}

.mailx__quickbtn:hover {
  background: var(--default);
  color: var(--foreground);
}

.mailx__quickbtn--accept:hover {
  background: var(--success-soft);
  color: var(--success-soft-foreground);
}

.mailx__quickbtn:disabled {
  opacity: .4;
  cursor: default;
}

.mailx__avatar[data-tone] {
  color: var(--foreground);
}

.mailx__avatar[data-tone="0"] {
  background: color-mix(in oklab, #5182e5 22%, var(--surface));
}

@supports (color: lab(0% 0 0)) {
  .mailx__avatar[data-tone="0"] {
    background: color-mix(in oklab, lab(54.5283% 7.71454 -56.6837) 22%, var(--surface));
  }
}

.mailx__avatar[data-tone="1"] {
  background: color-mix(in oklab, #29ac68 22%, var(--surface));
}

@supports (color: lab(0% 0 0)) {
  .mailx__avatar[data-tone="1"] {
    background: color-mix(in oklab, lab(62.4995% -48.0507 24.8074) 22%, var(--surface));
  }
}

.mailx__avatar[data-tone="2"] {
  background: color-mix(in oklab, #d38e00 24%, var(--surface));
}

@supports (color: lab(0% 0 0)) {
  .mailx__avatar[data-tone="2"] {
    background: color-mix(in oklab, lab(65.0191% 20.6923 71.3966) 24%, var(--surface));
  }
}

.mailx__avatar[data-tone="3"] {
  background: color-mix(in oklab, #cd5394 20%, var(--surface));
}

@supports (color: lab(0% 0 0)) {
  .mailx__avatar[data-tone="3"] {
    background: color-mix(in oklab, lab(53.6283% 54.2546 -10.5139) 20%, var(--surface));
  }
}

.mailx__avatar[data-tone="4"] {
  background: color-mix(in oklab, #009399 24%, var(--surface));
}

@supports (color: lab(0% 0 0)) {
  .mailx__avatar[data-tone="4"] {
    background: color-mix(in oklab, lab(54.9345% -43.5216 -17.7835) 24%, var(--surface));
  }
}

.mailx__avatar[data-tone="5"] {
  background: color-mix(in oklab, #c35141 20%, var(--surface));
}

@supports (color: lab(0% 0 0)) {
  .mailx__avatar[data-tone="5"] {
    background: color-mix(in oklab, lab(49.8905% 45.9999 33.1954) 20%, var(--surface));
  }
}

.mailx__listhead-shortcuts {
  opacity: 1;
  max-width: 220px;
  transition: max-width .28s var(--ease-smooth),
    opacity .18s var(--ease-smooth),
    margin-right .28s var(--ease-smooth);
  align-items: center;
  gap: 6px;
  display: flex;
  overflow: hidden;
}

.mailx__listhead-shortcuts[data-collapsed="true"] {
  opacity: 0;
  pointer-events: none;
  max-width: 0;
  margin-right: -8px;
}

.mailx__suggestchip {
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  border: none;
  flex-shrink: 0;
  font-family: inherit;
}

.mailx__suggestlist {
  overscroll-behavior: contain;
  border: 1px solid var(--border);
  background: var(--surface-secondary);
  border-radius: 12px;
  flex-direction: column;
  min-width: 0;
  max-height: 52vh;
  display: flex;
  overflow-y: auto;
}

.mailx__suggestion {
  border-top: 1px solid var(--separator);
}

.mailx__suggestion:first-child {
  border-top: none;
}

.mailx__suggestion .mailx__row, .mailx__suggestion .mailx__rowface {
  background: none;
  border-bottom: none;
}

.mailx__suggestion .mailx__quick {
  display: flex;
}

.mailx__suggestion .mailx__when {
  opacity: 0;
}

.mailx__suggestgroup + .mailx__suggestgroup {
  border-top: 1px solid var(--border);
}

.mailx__suggestreason {
  z-index: 1;
  background: var(--surface-secondary);
  border-bottom: 1px solid var(--separator);
  color: var(--muted);
  margin: 0;
  padding: 9px 14px 8px;
  font-size: 11.5px;
  line-height: 1.5;
  position: sticky;
  top: 0;
}

.mailx__reason {
  min-width: 140px;
  color: var(--muted);
  flex: 1;
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
}

.mailx__head .mailx__reason {
  margin-top: 8px;
}

.mailx__draftbanner {
  border: none;
  border-bottom: 1px solid var(--separator);
  background: var(--surface-secondary);
  width: 100%;
  min-width: 0;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 12.5px;
  display: flex;
}

.mailx__draftbanner:hover {
  background: var(--default);
  color: var(--foreground);
}

.mailx__draftbannertext {
  min-width: 0;
  color: var(--foreground);
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  font-weight: 500;
  overflow: hidden;
}

.mailx__draftbannerbad {
  color: var(--danger);
  font-weight: 500;
}

.mailx__draftbannergo {
  color: var(--accent);
  flex-shrink: 0;
  font-weight: 500;
}

.mailx__draftbanner[data-placement="above"] {
  display: none;
}

@media (max-width: 767px) {
  .mailx__draftbanner[data-placement="inlist"] {
    display: none;
  }

  .mailx__draftbanner[data-placement="above"] {
    border: 1px solid color-mix(in oklab, var(--accent) 28%, transparent);
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 13px;
    margin: 0 0 10px;
    padding: 12px 14px;
    display: flex;
  }

  .mailx__draftbanner[data-placement="above"] .mailx__draftbannertext {
    color: inherit;
  }

  .mailx__draftbanner[data-placement="above"]:hover {
    background: var(--accent-soft);
    color: var(--accent);
  }

  .mailx__draftbannergo {
    display: none;
  }
}

.maildrafts__head {
  align-items: center;
  gap: 10px;
  padding: 2px 4px 10px;
  display: flex;
}

.maildrafts__title {
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.maildrafts__state {
  color: var(--muted);
  align-items: center;
  gap: 8px;
  padding: 18px 6px;
  font-size: 13px;
  display: flex;
}

.maildrafts__groups {
  overscroll-behavior: contain;
  flex-direction: column;
  gap: 18px;
  max-height: 62vh;
  display: flex;
  overflow-y: auto;
}

.maildrafts__grouptitle {
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
  font-size: 11px;
  font-weight: 600;
}

.maildrafts__groupnote {
  color: var(--muted);
  margin: 4px 0 8px;
  font-size: 12px;
  line-height: 1.45;
}

.maildrafts__list {
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
}

.maildrafts__row {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 10px;
  display: flex;
}

.maildrafts__icon {
  color: var(--muted);
  flex-shrink: 0;
  display: inline-flex;
}

.maildrafts__body {
  flex-direction: column;
  flex: 1;
  gap: 2px;
  min-width: 0;
  display: flex;
}

.maildrafts__rowtitle {
  font-size: 13px;
  font-weight: 500;
}

.maildrafts__meta {
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  overflow: hidden;
}

.mailx__headacts {
  flex-shrink: 0;
  align-items: center;
  gap: 2px;
  display: flex;
}

.mailx__msg[data-expanded="true"] {
  background: var(--surface);
}

.mailx__msghead {
  transition: background .13s var(--ease-smooth);
}

.mailx__msg[data-expanded="true"] .mailx__msghead {
  border-bottom: 1px solid var(--separator);
}

.mailx__msghead:hover {
  background: var(--surface-hover);
}

.mailx__foot {
  --mail-foot-gap: 16px;
  padding: 0 22px 8px;
}

.mailx__search input[type="search"]::-webkit-search-cancel-button {
  appearance: none;
  display: none;
}

.mailx__search input[type="search"]::-webkit-search-decoration {
  appearance: none;
  display: none;
}

.mailx__bcc {
  color: var(--muted);
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  display: inline-flex;
}

.mailx__html--plain {
  white-space: pre-wrap;
}

.mailx__trimmed {
  background: var(--default);
  height: 18px;
  color: var(--muted);
  cursor: pointer;
  border: none;
  border-radius: 999px;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
  padding: 0 9px;
  font-size: 12px;
  line-height: 1;
  display: inline-flex;
}

.mailx__trimmed:hover {
  background: var(--default-hover);
  color: var(--foreground);
}

.casepick__none {
  color: var(--muted);
  padding: 14px 4px;
  font-size: 12.5px;
}

.mailx__shortcuts {
  flex-direction: column;
  gap: 16px;
  display: flex;
}

.mailx__keys {
  flex-direction: column;
  gap: 2px;
  margin: 0;
  display: flex;
}

.mailx__key {
  align-items: center;
  gap: 12px;
  padding: 5px 0;
  font-size: 13px;
  display: flex;
}

.mailx__key dt {
  flex: 0 0 96px;
  margin: 0;
}

.mailx__key dd {
  color: var(--muted);
  margin: 0;
}

.mailx__key kbd, .mailx__emptyhint kbd {
  border: 1px solid var(--border);
  background: var(--surface-secondary);
  font-family: var(--font-mono);
  color: var(--foreground);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 11px;
  display: inline-block;
}

@media print {
  .sidebar, .topbar, .tabbar, .mobile-header, .mailx__page .page__header, .mailx__list, .mailx__actions, .mailx__tabs, .page__actions, .mailx__headacts, .mailx__replyactions, .mailx__quick, .mailx__foot, .mailx__reason {
    display: none !important;
  }

  .mailx__page {
    padding: 0 !important;
  }

  .mailx, .mailx--page {
    height: auto !important;
    box-shadow: none !important;
    border: none !important;
    display: block !important;
  }

  .mailx__detail {
    color: #000 !important;
    background: #fff !important;
    border-radius: 0 !important;
    display: block !important;
    position: static !important;
    overflow: visible !important;
  }

  .mailx__detail * {
    color: #000 !important;
    box-shadow: none !important;
    background: none !important;
    border-color: #ccc !important;
  }

  .mailx__scroll {
    height: auto !important;
    min-height: 0 !important;
    display: block !important;
    overflow: visible !important;
  }

  .mailx__head {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: none !important;
    border-bottom: 1px solid #ccc !important;
    position: static !important;
  }

  .mailx__msg {
    -moz-column-break-inside: auto;
    break-inside: auto;
  }
}

@media (max-width: 767px) {
  .mailx__group {
    top: var(--sticky-top, 0px);
  }

  .mailx__tabs {
    top: var(--sticky-top, 0px);
    z-index: 3;
    position: sticky;
  }

  .mailx__tabs[data-stuck="true"] {
    border-radius: 0;
  }

  .mailx__page .page__header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }

  .mailx__page .page__title {
    font-size: 24px;
  }

  .mailx__detail {
    border-radius: 0;
  }

  body[data-mail-reading="true"] .tabbar, body[data-mail-searching="true"] .tabbar {
    opacity: 0;
    pointer-events: none;
    transform: translateY(100%);
  }

  body[data-mail-reading="true"] .tabbar {
    transition: none;
  }

  .mailx__msgtime--long {
    display: none;
  }

  .mailx__msgtime--short {
    display: inline;
  }

  .mailx__check, .mailx__listbar {
    display: none;
  }

  .mailx__list {
    border-radius: 13px;
  }

  .mailx__tabs {
    border-radius: 13px 13px 0 0;
    padding: 0 6px;
  }

  .mailx__tab {
    height: 40px;
    padding: 0 10px;
  }

  .mailx__foot {
    padding: 0 16px 8px;
  }

  .mailx__rowface {
    padding: 13px 12px 13px 13px;
  }

  .mailx--tabbed .mailx__tabs {
    display: none;
  }

  .mailx--tabbed .mailx__group {
    top: var(--sticky-top, 0px);
  }

  .mailx--tabbed .mailx__list {
    border-radius: 13px;
  }

  .mailx__viewchip {
    display: inline-flex;
  }

  .mailx--tabbed[data-list-stuck="false"] .mailx__rows > :first-child.mailx__group {
    border-top-left-radius: 13px;
    border-top-right-radius: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mailx__rowface {
    transition: none;
  }
}

.pub {
  background: var(--background);
  min-height: 100dvh;
  color: var(--foreground);
  flex-direction: column;
  display: flex;
}

.pub__bar {
  z-index: 10;
  background: color-mix(in oklab, var(--background) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--separator);
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  display: flex;
  position: sticky;
  top: 0;
}

.pub__nav {
  align-items: center;
  gap: 16px;
  display: flex;
}

.pub__navlink {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: color .12s;
}

.pub__navlink:hover {
  color: var(--foreground);
}

.pub__main {
  flex: 1;
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 56px 24px 72px;
}

.pub__hero {
  max-width: 62ch;
}

.pub__display {
  font-family: var(--font-serif);
  letter-spacing: -.025em;
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-style: italic;
  font-weight: 600;
  line-height: 1.04;
}

.pub__lede {
  color: var(--muted);
  margin: 20px 0 0;
  font-size: 17px;
  line-height: 1.65;
}

.pub__cta {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  display: flex;
}

.pub__note {
  color: var(--muted);
  margin: 18px 0 0;
  font-size: 12.5px;
}

.pub__grid {
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 14px;
  margin-top: 64px;
  display: grid;
}

.pub__card {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--surface-shadow);
  border-radius: 16px;
  padding: 20px;
}

.pub__cardicon {
  background: var(--accent-soft);
  width: 34px;
  height: 34px;
  color: var(--accent);
  border-radius: 10px;
  justify-content: center;
  align-items: center;
  display: inline-flex;
}

.pub__cardtitle {
  margin: 12px 0 0;
  font-size: 15px;
  font-weight: 600;
}

.pub__cardbody {
  color: var(--muted);
  margin: 6px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
}

.pub__panel {
  border: 1px solid var(--border);
  background: var(--surface-secondary);
  border-radius: 18px;
  margin-top: 56px;
  padding: 26px;
}

.pub__doc {
  max-width: 72ch;
}

.pub__title {
  font-family: var(--font-serif);
  letter-spacing: -.02em;
  margin: 0;
  font-size: clamp(2rem, 4.4vw, 2.6rem);
  font-style: italic;
  font-weight: 600;
  line-height: 1.1;
}

.pub__updated {
  color: var(--muted);
  margin: 10px 0 0;
  font-size: 12.5px;
}

.pub__h2 {
  letter-spacing: -.01em;
  margin: 40px 0 0;
  font-size: 18px;
  font-weight: 600;
}

.pub__h3 {
  margin: 26px 0 0;
  font-size: 14.5px;
  font-weight: 600;
}

.pub__body {
  color: var(--foreground);
  margin: 12px 0 0;
  font-size: 14.5px;
  line-height: 1.72;
}

.pub__panel .pub__body:first-of-type {
  margin-top: 10px;
}

.pub__body--boxed {
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 10px 10px 0;
  padding: 16px 18px;
  font-size: 14px;
}

.pub__list {
  margin: 12px 0 0;
  padding-left: 22px;
}

.pub__list > li {
  margin-top: 9px;
  font-size: 14.5px;
  line-height: 1.68;
}

.pub__link {
  color: var(--link);
  text-underline-offset: 2px;
}

.pub__code {
  font-family: var(--font-mono);
  background: var(--surface-secondary);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 12.5px;
}

.pub__foot {
  padding: 22px 24px calc(22px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--separator);
  color: var(--muted);
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  display: flex;
}

.pub__dot {
  opacity: .5;
}

@media (max-width: 640px) {
  .pub__bar {
    padding: 12px 16px;
  }

  .pub__nav {
    gap: 12px;
  }

  .pub__main {
    padding: 36px 16px 56px;
  }

  .pub__grid {
    margin-top: 44px;
  }

  .pub__panel {
    margin-top: 40px;
    padding: 20px;
  }

  .pub__foot {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.filestate {
  text-align: center;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 380px;
  margin: 0 auto;
  display: flex;
}

.filestate__icon {
  border-radius: 12px;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 2px;
  display: inline-flex;
}

.filestate__icon[data-tone="warning"] {
  background: var(--warning-soft);
  color: var(--warning-soft-foreground);
}

.filestate__icon[data-tone="neutral"] {
  background: var(--default);
  color: var(--muted);
}

.filestate__title {
  color: var(--foreground);
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.filestate__body {
  color: var(--muted);
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

.filestate__action {
  margin-top: 6px;
}

.filereject {
  margin-top: 8px;
}

.filereject__names {
  color: var(--muted);
}

.mailx__composeerror {
  margin-top: 10px;
}

.mailx__noticegap {
  margin-bottom: 12px;
}

.mailsetup__unconfigured {
  margin-top: 8px;
}

