/* Miro materials: opal, green marble, pale plaster, walnut and brushed brass. */
:root {
  color-scheme: light;
  --cream: #f3f1e9;
  --paper: #fffdf6;
  --ink: #232721;
  --muted: #565e51;
  --line: #d6d8ca;
  --control-border: #858b7c;
  --action: #435645;
  --on-action: #fffdf4;
  --leaf: #405742;
  --tint: #e8ebde;
  --tint-hover: #dde2d1;
  --focus: #735825;
  --brass: #947943;
  --orange: #933a25;
  --red-bg: #fae8dc;
  --walnut-ink: #765238;
  --walnut-tint: #f0e5d8;
  --gold-ink: #6f5427;
  --gold-tint: #f0e7d1;
  --opal-ink: #485645;
  --opal-tint: #e5e8da;
  --pine: #303d31;
  --hero: #475643;
  --hero-light: #e0d5b8;
  --sidebar-text: #f9f6e9;
  --accent: #d9c398;
  --accent-ink: #2f3022;
  --logo-mat: #faf8ee;
  --mat-border: #c5b184;
  --shadow: 0 18px 56px #34382c1a, 0 3px 9px #34382c09;
  --card-shadow: 0 3px 12px #34382c05;
  --serif: var(--miro-interface-font, 'Heebo', 'Arial Hebrew', Arial, sans-serif);
  --lime: var(--accent);
  --area-ink: var(--leaf);
  --area-tint: var(--tint);
  --area-line: var(--line);
  --area-solid: var(--action);
  --area-on-solid: var(--on-action);
  font-family: var(--serif);
  line-height: 1.5;
  color: var(--ink);
  background: var(--cream);
  -webkit-text-size-adjust: 100%;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --cream: #20231f;
  --paper: #292d27;
  --ink: #f3f1e8;
  --muted: #bdc2b2;
  --line: #484f43;
  --control-border: #848d7d;
  --action: #bbcab1;
  --on-action: #202c21;
  --leaf: #bdcbb2;
  --tint: #363e32;
  --tint-hover: #414b3b;
  --focus: #e0c58e;
  --brass: #bda16a;
  --orange: #f5b59a;
  --red-bg: #4b342c;
  --walnut-ink: #dbb698;
  --walnut-tint: #40362e;
  --gold-ink: #dcc496;
  --gold-tint: #413c2e;
  --opal-ink: #c1cbb8;
  --opal-tint: #384135;
  --pine: #232e26;
  --hero: #3b4a3d;
  --hero-light: #d8cfb3;
  --sidebar-text: #f4f1e6;
  --accent: #d2bc8d;
  --accent-ink: #292a1e;
  --logo-mat: #ede9d9;
  --mat-border: #a28e64;
  --shadow: 0 18px 56px #080b084d, 0 4px 12px #080b0829;
  --card-shadow: 0 3px 12px #080b081c;
}
body { background: var(--cream); color: var(--ink) }
::selection { background: var(--accent); color: var(--accent-ink) }
h1, h2, .grouphead h3, .backup-panel h3 {
  font-family: var(--serif);
  font-weight: 500;
  text-wrap: pretty;
}
.hero-copy h1, .auth-copy h1, .pagehead h1, .sectionhead h2, .panel-head h2, dialog header h2 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1.16;
}
.hero-copy h1 { font-size: clamp(2.45rem, 4.2vw, 3.8rem) }
.auth-copy h1 { font-size: clamp(2.05rem, 3.05vw, 2.85rem); font-weight: 500 }
.pagehead h1 { font-size: clamp(2.2rem, 3.8vw, 3.15rem) }
.sectionhead h2, .panel-head h2 { font-size: 1.45rem }
dialog header h2 { font-size: 1.55rem; overflow-wrap: anywhere }
.grouphead h3, .backup-panel h3 { font-size: 1.2rem }
.btn, .quiet, .navlink, .profile-account, .field, .auth-divider { letter-spacing: normal }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline-color: var(--focus) }
input:is([type="radio"], [type="checkbox"]) { accent-color: var(--action) }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1 }
:where(select, textarea, label, .detail, .rowtext, .portal > div) { min-width: 0 }
:where(.details, .rowtext, .detail) :where(bdi, small) { overflow-wrap: anywhere }

.sidebar {
  color: var(--sidebar-text);
  background: linear-gradient(163deg, var(--hero) -34%, var(--pine) 37%);
  border-inline-end: 1px solid color-mix(in srgb, var(--brass) 40%, var(--pine));
  overflow-y: auto;
  overscroll-behavior-y: contain;
}
.sidebar, .sidebar nav { scrollbar-width: thin }
.sidebar .brand, .auth-art .brand { background: var(--logo-mat); object-fit: contain }
.sidebar .brand {
  width: 8.1rem;
  margin: 0 .65rem 2.1rem;
  padding: .42rem .5rem;
  border: 1px solid var(--mat-border);
  border-radius: .25rem;
}
.sidebar .navlink { color: var(--sidebar-text) }
.sidebar .navlink.active {
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: inset -3px 0 0 color-mix(in srgb, var(--brass) 80%, var(--ink));
}
.sidebar .navlink:not(.active):hover, .sidebar .iconbtn:hover {
  color: white;
  background: color-mix(in srgb, var(--sidebar-text) 14%, var(--pine));
}
.sidebar :focus-visible, .hero :focus-visible { outline-color: var(--accent) }
.side-profile { margin-top: auto; border-top-color: color-mix(in srgb, var(--brass) 48%, var(--pine)) }
.side-profile small { color: var(--hero-light) }
.avatar, .btn.bright { background: var(--accent); color: var(--accent-ink) }
.btn { background: var(--area-solid); color: var(--area-on-solid) }
.btn:hover { background: color-mix(in srgb, var(--area-solid) 92%, var(--area-on-solid)) }
.btn.bright:hover { background: color-mix(in srgb, var(--accent) 82%, white); color: var(--accent-ink) }
.btn.line { background: var(--paper); color: var(--ink); border-color: var(--control-border) }
.btn.line:hover, .quiet:hover, .iconbtn:hover, button.item:hover { background: var(--area-tint) }
.quiet { color: var(--area-ink) }
.hero {
  color: var(--sidebar-text);
  background: linear-gradient(110deg, var(--hero), var(--pine) 74%);
  border: 1px solid color-mix(in srgb, var(--brass) 48%, var(--pine));
}
.hero-copy p { color: var(--sidebar-text) }
.hero-copy .eyebrow { color: var(--hero-light) }
.hero .art {
  inset: 0 auto 0 0;
  width: 39%;
  background:
    linear-gradient(90deg, transparent 35%, var(--hero) 100%),
    linear-gradient(#1d28183d, #1d28183d),
    url("/miro-materials.jpg") 18% 33% / cover no-repeat;
  mask-image: linear-gradient(90deg, black 62%, transparent);
}
.hero .art svg { display: none }
.metric, .panel { box-shadow: var(--card-shadow) }
.metric { border-block-start: 2px solid var(--area-line) }
.metric .value { font-family: var(--serif); font-weight: 500; font-variant-numeric: tabular-nums }
.metric:hover { border-color: var(--area-ink) }
.chipicon, .empticon, .pill { color: var(--area-ink); background: var(--area-tint) }
.chipicon.blue { color: var(--opal-ink); background: var(--opal-tint) }
.chipicon.purple { color: var(--gold-ink); background: var(--gold-tint) }
.chipicon.sand { color: var(--walnut-ink); background: var(--walnut-tint) }
.pill.hot { color: var(--orange); background: var(--red-bg) }
.item { overflow-wrap: anywhere }
.details, .formtip { background: var(--area-tint) }
.field input, .field select, .field textarea, .filters select, .searchbox, .cal-person select, .cal-date input {
  border-color: var(--control-border);
  background: var(--paper);
  color: var(--ink);
}
.field input[readonly] { background: var(--tint); color: var(--muted) }
.auth-copy .credentials .invalid, .invalid { color: var(--orange) }
.task-filters button[aria-pressed=true] { color: var(--area-ink); border-color: var(--area-ink); background: var(--area-tint) }
.cal-tag, .cal-entry-icon, .cal-clock, .att-bell { color: var(--area-ink) }
.cal-tag { background: var(--area-tint) }
.cal-segment[aria-pressed=true], .cal-tile.today { background: var(--area-solid); color: var(--area-on-solid) }
.cal-tile.today span { color: var(--area-on-solid) }
.cal-people input { accent-color: var(--action) }
.room-icon, .employee-chat-name, .chat-mention, .record-thread form .mention-trigger { color: var(--leaf) }
.room-choice[data-peer=""] .room-icon, .mobile-alerts [data-inbox-count] { background: var(--action); color: var(--on-action) }
#chat-drawer .compose-tools summary:is(:hover,:focus-visible), #chat-drawer .compose-tools[open] summary { color: var(--leaf) }
#chat-drawer .drawer-send { background: var(--action); color: var(--on-action) }
#chat-drawer .drawer-send:hover { background: color-mix(in srgb, var(--action) 92%, var(--on-action)) }
:root[data-theme="dark"] .message-bubble.own { background: var(--hero); border-color: var(--control-border) }
:root[data-theme="dark"] button.chat-launcher:not(.navlink) { border-color: var(--brass) }
.toast { color: var(--sidebar-text); box-shadow: var(--shadow); border: 1px solid var(--brass) }
dialog { overscroll-behavior: contain; box-shadow: var(--shadow) }
dialog::backdrop { background: #131a14a8 }
dialog .grouphead { flex-wrap: wrap }
dialog .grouphead h3 { min-width: 7rem }
dialog header > span { display: inline-flex; align-items: center }

.auth-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 100svh;
  padding: clamp(1.2rem, 5vw, 4rem);
  background:
    radial-gradient(ellipse at 12% 14%, color-mix(in srgb, var(--brass) 13%, transparent), transparent 53%),
    radial-gradient(ellipse at 89% 95%, color-mix(in srgb, var(--leaf) 12%, transparent), transparent 58%),
    var(--cream);
}
.auth {
  flex: none;
  width: min(100%, 62rem);
  grid-template-columns: 1.07fr 1fr;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  box-shadow: var(--shadow);
}
.auth-copy { min-width: 0; min-height: 32rem; gap: .94rem; padding: clamp(1.9rem, 4vw, 3.85rem) }
.auth-copy > .ic { display: none }
.auth-copy h1::before {
  content: "";
  display: block;
  width: 2.65rem;
  height: 2px;
  margin-bottom: 1.05rem;
  background: var(--brass);
}
.auth-copy > p { max-width: 35ch }
.auth-copy .credentials { gap: .85rem }
.auth-copy .field input { min-height: 2.9rem; border-radius: .55rem }
.auth-copy .credentials .btn, .auth-copy > .btn { min-height: 2.9rem }
.auth-art {
  display: flex;
  align-items: end;
  justify-content: center;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  background: var(--logo-mat);
  border-inline-start: 1px solid var(--mat-border);
  color: var(--sidebar-text);
}
.auth-art .art {
  position: absolute;
  inset: 0 0 6.65rem;
  background: var(--hero);
  border-bottom: 2px solid var(--mat-border);
}
.auth-art .art::before {
  content: "";
  position: absolute;
  inset: -3% -1px -10%;
  background: url("/miro-materials.jpg") 50% 49% / cover no-repeat;
}
.auth-art .art svg { display: none }
.auth-art .brand {
  width: auto;
  height: 6.65rem;
  max-width: 87%;
  object-fit: contain;
  padding: .93rem .85rem;
  border-radius: 0;
  mix-blend-mode: multiply;
}
.mobile-bar .brand { mix-blend-mode: multiply }
:root[data-theme="dark"] .mobile-bar .brand { mix-blend-mode: normal; border-radius: .24rem; padding: .16rem .35rem }

.palette-picker {
  border: 0;
  margin: 0;
  padding: 0;
  min-inline-size: 0;
  inline-size: fit-content;
  max-width: 100%;
}
.palette-picker > legend {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.palette-choices {
  display: inline-flex;
  gap: .16rem;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border: 1px solid var(--control-border);
  border-radius: 2rem;
  padding: .18rem;
}
.palette-choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .36rem;
  min-height: 2.75rem;
  min-width: 4.75rem;
  padding: .38rem .85rem;
  border-radius: 2rem;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
}
.palette-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}
.palette-icon, .palette-icon svg { display: inline-flex; flex: none; width: 1.03rem; height: 1.03rem }
.palette-choice:hover { color: var(--ink); background: var(--tint) }
.palette-choice:has(input:checked) { color: var(--on-action); background: var(--action) }
.palette-choice:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px }
.topbar .palette-workspace { margin-inline-start: auto }
.palette-account { padding: .75rem 1.25rem 1rem }

@media (max-width: 790px) {
  .mobile-bar {
    position: sticky; top: 0; z-index: 3;
    padding-top: max(.45rem, env(safe-area-inset-top));
    padding-inline: max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-left));
  }
  .sidebar { visibility: hidden; width: min(84vw, 290px); padding-block: max(1.5rem, env(safe-area-inset-top)) max(.75rem, env(safe-area-inset-bottom)) }
  .portal.open .sidebar { visibility: visible }
  .portal.open::before { background: #19221b8c }
  .workspace { padding-bottom: max(2rem, env(safe-area-inset-bottom)) }
  .sidebar .brand { margin-bottom: 1.25rem }
  .mobile-bar .iconbtn, .iconbtn, .quiet, .btn.small { min-width: 44px; min-height: 44px }
  .filters select, .field select, .field input, .field textarea, .searchbox input { font-size: 1rem; max-width: 100% }
  .filters select, .field select, .field input:not([type=checkbox]), .searchbox input { min-height: 44px }
  .grouphead .quiet { text-align: start }
  .topbar > span { min-width: 0; gap: .38rem }
  .metric-head { font-size: .91rem }
}
@media (max-width: 640px) {
  .topbar .palette-workspace .palette-choice { min-width: 2.75rem; padding: .36rem }
  .topbar .palette-workspace .palette-choice > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap }
  .auth-wrap { padding: max(.85rem, env(safe-area-inset-top)) .85rem max(.6rem, env(safe-area-inset-bottom)); gap: .65rem }
  .auth { display: flex; flex-direction: column-reverse; width: min(100%, 29rem); border-radius: 1rem }
  .auth-copy { min-height: 0; padding: clamp(1.1rem, 5vw, 1.85rem); gap: .7rem }
  .auth-copy h1 { font-size: clamp(1.8rem, 6.5vw, 2.24rem) }
  .auth-copy h1::before { width: 2rem; margin-bottom: .65rem }
  .auth-copy .credentials { gap: .65rem }
  .auth-art { min-height: 5.85rem; justify-content: flex-start; align-items: center; padding: 0 .7rem; border: 0; border-bottom: 1px solid var(--mat-border) }
  .auth-art .art { inset: 0 auto 0 0; width: 56%; border-bottom: 0; border-inline-start: 1px solid var(--mat-border) }
  .auth-art .art::before { background-position: 48% 47% }
  .auth-art .brand { width: 38%; padding: .5rem .15rem; height: auto }
}
@media (max-width: 565px) {
  .hero { min-height: 170px }
  .hero .art { inset: 0 auto 0 0; width: 38%; opacity: 1 }
  .workspace { padding-inline: max(.8rem, env(safe-area-inset-left)) max(.8rem, env(safe-area-inset-right)) }
  .topbar, .panel-head, .pagehead, .sectionhead { flex-wrap: wrap }
  .topbar .date { white-space: nowrap; font-size: .875rem }
  .filters { align-items: stretch }
  .filters > select { width: 100% }
  .sectionhead h2, .panel-head h2 { font-size: 1.32rem }
  .panel-head { gap: .35rem }
  .item { gap: .55rem }
  dialog {
    inset: auto 0 0; margin: 0 auto; width: 100%; max-width: 100%;
    max-height: 91svh; max-height: 91dvh; border-radius: 18px 18px 0 0;
    border-bottom: none; padding-bottom: env(safe-area-inset-bottom);
  }
  dialog header { padding: .55rem .95rem; z-index: 2 }
  dialog header h2 { font-size: 1.4rem }
  dialog form, dialog .body { padding: 1rem }
  dialog .details { gap: .8rem }
  dialog .footer { row-gap: .5rem }
}
@media (max-width: 380px) {
  .pagehead .btn { white-space: normal }
  .details { grid-template-columns: 1fr }
  .item .pill { white-space: normal; text-align: center }
  .workspace { padding-inline: .85rem }
}
@media (forced-colors: active) {
  .palette-choice:has(input:checked) { outline: 2px solid Highlight; outline-offset: -3px }
  .palette-choice:has(input:focus-visible) { outline: 2px solid Highlight; outline-offset: 2px }
}
