/* maiday — a quiet workspace for everyday people operations. */
:root {
  color-scheme: light;
  --paper: #f7f8f5;
  --surface: #ffffff;
  --surface-2: #f4f5f1;
  --sidebar: #eeefe9;
  --ink: #282f29;
  --ink-2: #626a61;
  --ink-3: #747c72;
  --rule: #e5e8e0;
  --rule-strong: #c9cec3;
  --accent: #496449;
  --accent-hover: #354d35;
  --accent-soft: #e4ebdf;
  --on-accent: #ffffff;
  --red: #ad4d43;
  --red-soft: #f8ebe7;
  --amber: #926b2b;
  --amber-soft: #f7efdc;
  --green: #496c4d;
  --green-soft: #eaf1e6;
  --focus-bg: #eaf0e4;
  --focus-art: #bccdac;
  --tick: #e1e5dc;
  --tick-past: #718769;
  --toast: #28362b;
  --on-toast: #ffffff;
  --shadow: 0 3px 10px rgb(36 48 30 / 3%);
  --font: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-s: 8px;
  --r-m: 14px;
  --gutter: 36px;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --paper: #171c19;
  --surface: #1f2521;
  --surface-2: #252d27;
  --sidebar: #1b211d;
  --ink: #e4e9df;
  --ink-2: #b0baab;
  --ink-3: #98a591;
  --rule: #333d33;
  --rule-strong: #53614d;
  --accent: #b1c89a;
  --accent-hover: #c7dfb1;
  --accent-soft: #35452e;
  --on-accent: #1e2b18;
  --red: #edaca0;
  --red-soft: #412e2a;
  --amber: #e5c18a;
  --amber-soft: #3e3627;
  --green: #b1cda1;
  --green-soft: #2c3c2c;
  --focus-bg: #2b382a;
  --focus-art: #60774e;
  --tick: #374432;
  --tick-past: #a2bb8c;
  --toast: #dfebd7;
  --on-toast: #1b271b;
  --shadow: 0 3px 12px rgb(0 0 0 / 6%);
}
/* Soft lavender surfaces with plum text and violet accents. */
:root[data-theme='purple-light'] {
  color-scheme: light;
  --paper: #faf7fd;
  --surface: #fffcff;
  --surface-2: #f5eefb;
  --sidebar: #f0e7f8;
  --ink: #392b46;
  --ink-2: #6a557b;
  --ink-3: #796487;
  --rule: #e8dcef;
  --rule-strong: #cdb6de;
  --accent: #8050a6;
  --accent-hover: #673c8b;
  --accent-soft: #e6d5f3;
  --on-accent: #ffffff;
  --red: #a24460;
  --red-soft: #fbe9ef;
  --amber: #886024;
  --amber-soft: #fbf0dd;
  --green: #416b58;
  --green-soft: #e9f3ed;
  --focus-bg: #eee1f8;
  --focus-art: #ccb0e2;
  --tick: #e2d3ed;
  --tick-past: #9470b0;
  --toast: #513568;
  --on-toast: #ffffff;
  --shadow: 0 3px 12px rgb(107 64 138 / 5%);
}
/* A cozy plum workspace with soft lilac highlights. */
:root[data-theme='purple-dark'] {
  color-scheme: dark;
  --paper: #1e1727;
  --surface: #2a2035;
  --surface-2: #34283f;
  --sidebar: #241b2e;
  --ink: #f2e8fa;
  --ink-2: #cebbdc;
  --ink-3: #b8a2c8;
  --rule: #45344f;
  --rule-strong: #715780;
  --accent: #d2a8ef;
  --accent-hover: #e4c5fa;
  --accent-soft: #493159;
  --on-accent: #2e193d;
  --red: #f2abc4;
  --red-soft: #492b3b;
  --amber: #ebc68f;
  --amber-soft: #44352e;
  --green: #a9d3bb;
  --green-soft: #2a3d36;
  --focus-bg: #3b294b;
  --focus-art: #795592;
  --tick: #4b365a;
  --tick-past: #bc92d7;
  --toast: #ead8f7;
  --on-toast: #2e193d;
  --shadow: 0 3px 12px rgb(10 4 18 / 15%);
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.2;
  font-weight: 650;
}

h2 {
  font-size: 19px;
}

h3 {
  font-size: 14px;
}

h4 {
  font-size: 14px;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent-hover);
}

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

[hidden] {
  display: none !important;
}

.wrap {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (min-width: 760px) {
  :root {
    --gutter: 32px;
  }
}

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

.hint {
  color: var(--ink-2);
  font-size: 14px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 8px;
  z-index: 10;
  background: var(--surface);
  padding: 8px 12px;
}

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--r-s);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn--primary:hover:not(:disabled) {
  background: var(--accent-hover);
  color: var(--on-accent);
}

.btn--quiet {
  background: var(--surface);
  border-color: var(--rule);
  color: var(--ink);
}

.btn--quiet:hover:not(:disabled) {
  background: var(--surface-2);
  color: var(--ink);
}

.btn--danger {
  color: var(--red);
}

.btn--danger:hover:not(:disabled) {
  color: var(--red);
}

.btn[data-armed='true'] {
  background: var(--red);
  border-color: var(--red);
  color: var(--surface);
}

.btn--small {
  min-height: 28px;
  padding: 3px 10px;
  font-size: 13px;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* --- Forms ---------------------------------------------------------------- */

.fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px 18px;
}

.field {
  min-width: 0;
}

.field--wide {
  grid-column: 1 / -1;
}

.field > label,
.filters label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.optional {
  font-weight: 400;
  color: var(--ink-3);
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 7px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--r-s);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

textarea {
  resize: vertical;
  min-height: 60px;
}

input:disabled,
select:disabled {
  background: var(--surface-2);
  color: var(--ink-3);
  border-style: dashed;
}

[aria-invalid='true'] {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red);
}

.field-error {
  margin-top: 4px;
  font-size: 13px;
  color: var(--red);
}

.field-error:empty {
  display: none;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.check input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.link-input {
  display: flex;
  gap: 8px;
}

.link-input input {
  flex: 1;
  min-width: 0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.extras {
  margin: 18px 0 0;
  padding: 14px 0 0;
  border: 0;
  border-top: 1px dashed var(--rule-strong);
}

.extras legend {
  padding: 0 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

/* --- Deadline chips ------------------------------------------------------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.chip::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.chip--overdue {
  background: var(--red-soft);
  color: var(--red);
}

.chip--due_today,
.chip--due_soon {
  background: var(--amber-soft);
  color: var(--amber);
}

.chip--done_on_time,
.chip--done_late {
  background: var(--green-soft);
  color: var(--green);
}

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

/* --- Business-day ribbon -------------------------------------------------- */

.ribbon {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  margin-top: 10px;
}

.wk {
  display: flex;
  align-items: flex-end;
  gap: 2px;
}

.t {
  position: relative;
  display: block;
  width: 4px;
  height: 12px;
  border-radius: 1px;
  background: var(--tick);
}

.t--due {
  height: 18px;
}

.t--past {
  background: var(--tick-past);
}

.t--late {
  background: var(--red);
}

.t--now {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent);
}

.ribbon-over {
  margin-left: 2px;
  font-size: 12px;
  font-weight: 650;
  color: var(--ink-2);
  line-height: 1;
}

.ribbon-over.is-late {
  color: var(--red);
}

.ribbon--large {
  gap: clamp(6px, 1.6vw, 14px);
  margin-top: 30px;
  max-width: 640px;
}

.ribbon--large .wk {
  flex: 1;
  gap: clamp(2px, 0.5vw, 4px);
}

.ribbon--large .t {
  flex: 1;
  width: auto;
  height: 28px;
  border-radius: 2px;
}

.ribbon--large .t--due {
  height: 40px;
}

.ribbon--large .t--due::after {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  white-space: nowrap;
}

.ribbon--large .ribbon-over {
  font-size: 14px;
  align-self: center;
}

/* The one orchestrated moment: on the detail page, elapsed days fill in order. */
@media (prefers-reduced-motion: no-preference) {
  .ribbon--large .t--past {
    animation: tick-fill 260ms ease-out backwards;
    animation-delay: calc(var(--i) * 22ms);
  }

  @keyframes tick-fill {
    from {
      background: var(--tick);
    }
  }
}

.empty {
  color: var(--ink-2);
}

.groups {
  display: grid;
}

.group {
  display: grid;
  gap: 12px 32px;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
}

.group:first-child {
  border-top: 0;
  padding-top: 4px;
}

@media (min-width: 860px) {
  .group {
    grid-template-columns: 260px 1fr;
  }
}

.group-name {
  font-size: 17px;
  font-weight: 650;
  color: var(--ink);
  text-decoration: none;
}

.group-name:hover {
  color: var(--accent);
  text-decoration: underline;
}

.group-meta {
  margin-top: 2px;
  font-size: 13px;
  color: var(--ink-2);
}

.needs {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.need {
  padding-left: 14px;
  border-left: 3px solid var(--rule-strong);
}

.need--overdue {
  border-left-color: var(--red);
}

.need--due_today,
.need--due_soon,
.need--warn {
  border-left-color: var(--amber);
}

.need-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}

.need-umbrella {
  font-weight: 650;
}

.need-due {
  font-size: 13px;
  color: var(--ink-2);
}

.need-items {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.need-items li {
  padding: 2px 0;
}

.need-items a {
  font-weight: 600;
}

.need-items span {
  color: var(--ink-2);
}

/* --- Roster table --------------------------------------------------------- */

.table-scroll {
  overflow-x: auto;
  margin: 0 calc(var(--gutter) * -1);
  padding: 0 var(--gutter);
}

.roster {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 14px;
}

.roster th,
.roster td {
  padding: 10px 12px 10px 0;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--rule);
}

.roster thead th {
  border-bottom-color: var(--rule-strong);
  padding-top: 0;
}

.roster tbody th {
  font-weight: 600;
}

.roster .num {
  text-align: left;
}

.roster tbody tr:last-child > * {
  border-bottom: 0;
}

.row-sub {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-3);
}

.sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.sort:hover {
  color: var(--ink);
}

.sort-mark {
  font-size: 9px;
}

.prog {
  display: inline-grid;
  gap: 4px;
  min-width: 56px;
}

.prog-n {
  font-weight: 600;
}

.bar {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--tick);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  background: var(--tick-past);
}

.prog--overdue .prog-n {
  color: var(--red);
}

.prog--overdue .bar i {
  background: var(--red);
}

.prog--due_today .bar i,
.prog--due_soon .bar i {
  background: var(--amber);
}

.prog--due_today .prog-n,
.prog--due_soon .prog-n {
  color: var(--amber);
}

.prog--done_on_time .bar i,
.prog--done_late .bar i {
  background: var(--green);
}

/* --- Employee page -------------------------------------------------------- */

.back {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 600;
}

.emp-head {
  padding-bottom: 8px;
}

.emp-title {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.emp-head h1 {
  font-size: clamp(28px, 4.4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.emp-sub {
  margin-top: 4px;
  color: var(--ink-2);
}

.emp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px 24px;
  margin: 24px 0 0;
}

.facts dt {
  font-size: 13px;
  color: var(--ink-2);
}

.facts dd {
  margin: 2px 0 0;
  font-weight: 600;
}

.emp-notes {
  margin-top: 18px;
  max-width: 70ch;
  color: var(--ink-2);
  white-space: pre-line;
}

.emp-edit {
  margin-top: 24px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-m);
}

.emp-edit h2 {
  margin-bottom: 14px;
}

.emp-edit .hint {
  margin-top: 12px;
}

.umbrella {
  margin-top: 24px;
  padding: 20px var(--gutter) 8px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-m);
}

@media (min-width: 760px) {
  .umbrella {
    padding: 24px 28px 10px;
  }
}

.umbrella-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 16px;
  padding-bottom: 14px;
}

.umbrella-head p {
  margin-top: 4px;
  font-size: 14px;
}

.item {
  border-top: 1px solid var(--rule);
}

.item > summary {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: start;
  gap: 4px 12px;
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
}

.item > summary::-webkit-details-marker {
  display: none;
}

.item-mark {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1.5px solid var(--rule-strong);
  border-radius: 50%;
}

.item.is-complete .item-mark {
  border-color: var(--green);
  background: var(--green)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 14px no-repeat;
}

.item-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.item-name {
  font-weight: 650;
}

.item > summary:hover .item-name {
  color: var(--accent);
}

.item-state {
  font-size: 14px;
  color: var(--ink-2);
}

.item-warn {
  font-size: 13px;
  font-weight: 600;
  color: var(--amber);
}

.item-warn::before {
  content: '! ';
}

.item[open] > summary {
  padding-bottom: 10px;
}

.item-form,
.bg-body {
  padding: 4px 0 22px 30px;
}

.bg-body .item-form {
  padding: 0;
}

.bg-body .hint {
  margin-bottom: 14px;
}

@media (max-width: 600px) {
  .item-form,
  .bg-body {
    padding-left: 0;
  }

  .item > summary {
    grid-template-columns: 18px 1fr;
  }

  .item > summary .chip {
    grid-column: 2;
    justify-self: start;
  }
}

.bg-body {
  display: grid;
  gap: 28px;
}

@media (min-width: 980px) {
  .bg-body {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

.bg-timeline h3 {
  margin-bottom: 10px;
}

.timeline {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 4px 12px;
  padding: 8px 0 12px 18px;
  border-left: 2px solid var(--rule);
}

.timeline li::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 13px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--tick-past);
}

.timeline li:last-child:not(.is-voided)::before {
  background: var(--accent);
  border-color: var(--accent);
}

.timeline time {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  padding-top: 1px;
}

.timeline .btn {
  align-self: start;
}

.tl-status {
  font-weight: 600;
}

.tl-note {
  margin-top: 2px;
  font-size: 14px;
  color: var(--ink-2);
}

.tl-by {
  margin-top: 2px;
  font-size: 13px;
  color: var(--ink-3);
}

.timeline .is-voided .tl-body,
.timeline .is-voided time {
  color: var(--ink-3);
  text-decoration: line-through;
}

.event-form {
  padding: 16px;
  background: var(--surface-2);
  border-radius: var(--r-m);
}

.event-form h4 {
  margin-bottom: 12px;
}

.event-form .form-actions {
  margin-top: 14px;
}

.log {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  max-height: 480px;
  overflow-y: auto;
}

.log li {
  display: grid;
  gap: 2px 18px;
  padding: 9px 0;
  border-top: 1px solid var(--rule);
}

.log li:first-child {
  border-top: 0;
}

@media (min-width: 760px) {
  .log li {
    grid-template-columns: 170px 1fr;
  }
}

.log time {
  color: var(--ink-3);
  font-size: 13px;
}

.log-old {
  color: var(--ink-3);
}

.log-new {
  font-weight: 600;
}

.log-by {
  margin-left: 8px;
  color: var(--ink-3);
}

.error-state {
  display: grid;
  gap: 12px;
  justify-items: start;
}

/* --- Dialog & toasts ------------------------------------------------------ */

dialog {
  width: min(540px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 24px;
  border: 1px solid var(--rule);
  border-radius: var(--r-m);
  background: var(--surface);
  color: var(--ink);
}

dialog::backdrop {
  background: rgb(15 20 26 / 0.45);
}

dialog h2 {
  font-size: 22px;
}

dialog .hint {
  margin: 6px 0 18px;
}

.toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 20;
  display: grid;
  justify-items: end;
  gap: 8px;
  pointer-events: none;
}

.toast {
  max-width: 420px;
  padding: 10px 14px;
  border-radius: var(--r-s);
  background: var(--toast);
  color: var(--on-toast);
  font-size: 14px;
  font-weight: 500;
  pointer-events: auto;
  transition: opacity 300ms ease;
}

.toast--error {
  background: var(--red);
  color: #fff;
}

.toast--warn {
  background: var(--amber-soft);
  color: var(--amber);
  border: 1px solid var(--amber);
}

.toast.is-leaving {
  opacity: 0;
}

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

/* Workspace shell */
.icon { flex: 0 0 auto; vertical-align: middle; }
[data-icon] { display: inline-flex; align-items: center; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 5; width: 224px; padding: 38px 20px 22px; background: var(--sidebar); border-right: 1px solid var(--rule); display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 12px; color: var(--ink); font-size: 30px; font-weight: 700; letter-spacing: -1.5px; text-decoration: none; line-height: 1.2; }
.brand:hover { color: var(--ink); }
.brand-dot { color: var(--accent); }
.brand-mark { display: flex; align-items: end; gap: 3px; width: 28px; height: 30px; transform: rotate(-8deg); }
.brand-mark i { display: block; width: 7px; height: 21px; border-radius: 5px; background: var(--accent); }
.brand-mark i:nth-child(2) { height: 29px; }
.brand-mark i:nth-child(3) { height: 24px; opacity: .6; }
.workspace-label { margin: 52px 12px 16px; color: var(--ink-3); font-size: 10px; font-weight: 600; letter-spacing: 1.5px; }
.main-nav { display: grid; gap: 7px; }
.main-nav a { display: flex; align-items: center; gap: 12px; padding: 12px; min-height: 44px; color: var(--ink-2); text-decoration: none; border-radius: 8px; font-size: 13px; font-weight: 500; }
.main-nav a:hover { background: var(--surface-2); color: var(--ink); }
.main-nav a[aria-current='page'] { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.main-nav .icon { width: 18px; height: 18px; }
.nav-count { margin-left: auto; font-size: 10px; min-width: 20px; padding: 1px 6px; text-align: center; background: var(--surface); color: var(--ink-2); border-radius: 5px; }
.nav-count:empty { display: none; }
.nav-count--alert { color: var(--red); background: var(--red-soft); }
.sidebar-bottom { margin-top: auto; padding-top: 48px; }
.workspace-note { border: 1px solid var(--rule-strong); border-radius: 10px; padding: 16px 13px; margin: 0 3px 27px; }
.workspace-note > span { color: var(--accent); margin-bottom: 9px; }
.workspace-note strong { display: block; font-size: 11px; font-weight: 600; }
.workspace-note p { color: var(--ink-3); font-size: 11px; line-height: 1.7; margin-top: 5px; }
.appearance-label { font-size: 11px; color: var(--ink-3); margin: 0 4px 9px; }
.theme-switch { display: flex; padding: 4px; border: 1px solid var(--rule); border-radius: 9px; background: var(--paper); gap: 3px; }
.theme-switch button { flex: 1; min-width: 0; cursor: pointer; background: transparent; color: var(--ink-3); border: 0; border-radius: 6px; padding: 6px; min-height: 34px; }
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[data-theme-choice^='purple-'] { color: #8050a6; }
:root:is([data-theme='dark'], [data-theme='purple-dark']) .theme-switch button[data-theme-choice^='purple-'] { color: #d5b0f2; }
.theme-switch button[aria-pressed='true'] { background: var(--surface); color: var(--accent); box-shadow: 0 1px 5px rgb(0 0 0 / 8%); }
.theme-switch .icon { width: 17px; height: 17px; }
.sidebar-caption { margin-top: 18px; font-size: 9px; text-align: center; color: var(--ink-3); }
.app-shell { margin-left: 224px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 86px; flex-shrink: 0; border-bottom: 1px solid var(--rule); padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.breadcrumb { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--ink-3); }
.breadcrumb strong { color: var(--ink-2); font-weight: 500; }
.who { display: flex; align-items: center; gap: 9px; }
.editor-avatar { width: 33px; height: 33px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); justify-content: center; }
.editor-avatar .icon { width: 16px; }
.who-field { display: grid; font-size: 9px; color: var(--ink-3); }
.who strong { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--ink); font-weight: 600; }
#view { padding-top: 34px; padding-bottom: 28px; flex: 1; outline: none; }
.app-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; color: var(--ink-3); padding: 22px var(--gutter); font-size: 10px; margin-top: auto; }
.app-footer span:last-child { display: flex; align-items: center; gap: 7px; }
.app-footer i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.loading-state { padding: 60px; text-align: center; color: var(--ink-3); }

/* Overview */
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 28px; }
.today { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--ink-3); margin-bottom: 10px; }
.today .icon { width: 14px; height: 14px; }
.page-heading h1 { font-size: clamp(30px, 3.5vw, 38px); letter-spacing: -1.5px; font-weight: 600; }
.heading-dot { color: var(--accent); }
.overview-sub { color: var(--ink-2); font-size: 12px; margin-top: 9px; }
.heading-actions { display: flex; gap: 10px; align-items: center; }
.heading-actions .btn { font-size: 12px; }
.heading-actions .icon { width: 16px; height: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { display: flex; flex-direction: column; padding: 18px 20px 16px; text-align: left; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); border-radius: var(--r-m); font: inherit; cursor: pointer; box-shadow: var(--shadow); }
.stat:hover { border-color: var(--rule-strong); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-2); width: 100%; }
.stat-icon { padding: 7px; border-radius: 9px; display: inline-flex; }
.stat-icon .icon { width: 17px; height: 17px; }
.tone-sage { background: var(--green-soft); color: var(--green); }
.tone-rose { background: var(--red-soft); color: var(--red); }
.tone-sand { background: var(--amber-soft); color: var(--amber); }
.stat-value { font-size: 34px; line-height: 1.2; letter-spacing: -1px; margin: 10px 0 13px; font-weight: 600; }
.stat-note { color: var(--ink-3); font-size: 10px; display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; }
.stat-note .icon { width: 13px; height: 13px; }
.daily-grid { display: grid; grid-template-columns: 1.12fr 1fr; gap: 20px; margin-top: 24px; }
.focus-card { overflow: hidden; position: relative; background: var(--focus-bg); border: 1px solid var(--rule); border-radius: var(--r-m); padding: 24px; min-height: 222px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--accent); font-size: 10px; letter-spacing: 1px; font-weight: 600; }
.eyebrow .icon { width: 16px; height: 16px; }
.focus-card h2 { font-size: 23px; line-height: 1.35; font-weight: 500; letter-spacing: -.6px; max-width: 85%; margin-top: 16px; position: relative; z-index: 1; }
.focus-card p { font-size: 12px; line-height: 1.8; max-width: 76%; margin-top: 9px; position: relative; z-index: 1; color: var(--ink-2); }
.text-link { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); text-decoration: none; background: transparent; border: 0; font: inherit; font-size: 11px; font-weight: 600; padding: 4px 0; cursor: pointer; }
.text-link:hover { color: var(--accent-hover); text-decoration: underline; }
.focus-card .text-link { margin-top: 14px; position: relative; z-index: 1; }
.text-link .icon { width: 15px; height: 15px; }
.focus-art { position: absolute; bottom: -35px; right: -20px; height: 145px; width: 145px; opacity: .48; transform: rotate(-28deg); pointer-events: none; }
.focus-art span { position: absolute; width: 66px; height: 130px; border: 1px solid var(--focus-art); background: var(--focus-art); border-radius: 70px 70px 0 0; transform-origin: bottom center; }
.focus-art span:first-child { transform: rotate(-35deg); }
.focus-art span:nth-child(2) { transform: rotate(0); opacity: .65; }
.focus-art span:nth-child(3) { transform: rotate(35deg); opacity: .35; }
.tracking-card { padding: 23px 24px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-m); }
.tracking-card h2 { font-size: 14px; }
.tracking-card .panel-head { margin-bottom: 19px; }
.tracking-card .muted { font-size: 10px; }
.tracking-row { display: flex; align-items: center; gap: 12px; margin-top: 15px; }
.tracking-icon { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; color: var(--ink-3); background: var(--surface-2); border-radius: 7px; }
.tracking-icon .icon { width: 15px; height: 15px; }
.tracking-progress { flex: 1; }
.tracking-progress > div:first-child { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 7px; }
.tracking-progress .bar { height: 4px; }
.tracking-progress .bar i { background: var(--accent); }

/* Directory and action list */
.panel { margin-top: 24px; padding: 24px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-m); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.panel > h2 { margin-bottom: 18px; }
.section-title { display: flex; align-items: center; gap: 9px; }
.section-title h2 { font-size: 16px; letter-spacing: -.3px; }
.count-badge { display: inline-flex; align-items: center; justify-content: center; font-size: 10px; border: 1px solid var(--rule); border-radius: 6px; padding: 1px 7px; color: var(--ink-2); }
.panel-description { font-size: 10px; color: var(--ink-3); }
.filters { display: grid; grid-template-columns: 1.5fr 1fr 1.3fr 1.2fr auto; align-items: end; gap: 12px; margin-bottom: 22px; }
.filters label { font-size: 10px; font-weight: 500; margin-bottom: 5px; }
.filters input, .filters select { font-size: 11px; min-height: 37px; padding: 7px 9px; }
.filters select { padding-right: 22px; }
.search-input { position: relative; }
.search-input > .icon { position: absolute; left: 10px; top: 11px; width: 15px; height: 15px; color: var(--ink-3); }
.search-input input { padding-left: 31px; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
.reset-filters { border: 0; background: none; font: inherit; font-size: 10px; color: var(--ink-3); cursor: pointer; min-height: 37px; padding: 6px; }
.reset-filters:hover { color: var(--accent); }
.table-scroll { margin: 0 -24px; padding: 0; }
.roster { min-width: 850px; font-size: 11px; }
.roster th, .roster td { padding: 18px 12px; }
.roster thead th { padding: 11px 12px; background: var(--surface-2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.roster tr > :first-child { padding-left: 24px; }
.roster tr > :last-child { padding-right: 24px; }
.roster tbody tr:hover { background: var(--surface-2); }
.sort { font-size: 10px; font-weight: 500; white-space: nowrap; }
.employee-link { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; min-width: 165px; font-size: 12px; }
.employee-link:hover { color: var(--accent); }
.avatar { display: inline-flex; flex-shrink: 0; width: 34px; height: 34px; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 600; border-radius: 50%; }
.roster tbody tr:nth-child(3n+2) .avatar { background: var(--amber-soft); color: var(--amber); }
.roster tbody tr:nth-child(3n+3) .avatar { background: var(--red-soft); color: var(--red); }
.row-sub { font-size: 10px; margin-top: 3px; }
.prog { min-width: 47px; gap: 5px; }
.prog-n { font-size: 11px; font-weight: 500; }
.prog .bar { height: 3px; }
.table-footer { border-top: 1px solid var(--rule); margin: 0 -24px -24px; padding: 15px 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 10px; color: var(--ink-3); }
.table-footer span:last-child { display: flex; align-items: center; gap: 6px; }
.table-footer .icon { width: 13px; height: 13px; }
.dashboard-note { display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 10px; color: var(--ink-3); padding: 22px 0 0; text-align: center; }
.dashboard-note .icon { width: 14px; height: 14px; color: var(--accent); }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 45px 20px; gap: 12px; }
.empty-state > .icon { width: 34px; height: 34px; padding: 6px; background: var(--accent-soft); color: var(--accent); border-radius: 9px; }
.empty-state h3 { font-size: 17px; font-weight: 500; }
.empty-state p { font-size: 12px; color: var(--ink-3); max-width: 380px; }
.empty-state .btn { margin-top: 5px; font-size: 12px; }
.group { padding: 24px 0; grid-template-columns: 220px 1fr; }
.group-name { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.group-meta { font-size: 11px; margin-top: 9px; }
.need-umbrella { font-size: 12px; }
.need-due { font-size: 11px; }
.need-items { font-size: 12px; }
.need-items a { text-decoration: none; }
.need-items a:hover { text-decoration: underline; }

/* Employee workspace */
.back { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; text-decoration: none; color: var(--ink-2); margin-bottom: 24px; }
.back .icon { width: 15px; height: 15px; }
.emp-head { padding: 26px; border: 1px solid var(--rule); background: var(--surface); border-radius: var(--r-m); }
.emp-title { gap: 20px; align-items: center; }
.emp-title-main { display: flex; align-items: center; gap: 16px; }
.emp-title-main .avatar { width: 52px; height: 52px; border-radius: 16px; font-size: 16px; }
.emp-head h1 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -1px; font-weight: 600; }
.emp-sub { font-size: 12px; overflow-wrap: anywhere; }
.emp-actions { gap: 7px; }
.emp-actions .btn { font-size: 11px; min-height: 35px; padding: 8px 11px; }
.facts { border-top: 1px solid var(--rule); padding-top: 22px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 30px; }
.facts dt { font-size: 11px; }
.facts dd { margin-top: 5px; font-size: 12px; }
.emp-notes { font-size: 12px; }
.emp-edit { background: var(--surface-2); }
.detail-nav { display: flex; gap: 10px; padding: 22px 0 0; overflow-x: auto; }
.detail-nav button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid var(--rule); border-radius: 8px; color: var(--ink-2); background: var(--surface); font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.detail-nav button:hover { color: var(--accent); border-color: var(--accent); }
.detail-nav .icon { width: 15px; height: 15px; }
.detail-nav .count-badge { border: 0; background: var(--surface-2); }
.umbrella { scroll-margin-top: 24px; }
.umbrella-head h2 { font-size: 17px; }
.umbrella-head p { font-size: 11px; }
.item { scroll-margin-top: 24px; }
.item-name { font-size: 13px; }
.item-state { font-size: 11px; }
.item[open] > summary .item-name { color: var(--accent); }
.item[open] > summary { padding-bottom: 20px; }
.item-form, .bg-body { padding-bottom: 26px; }
.item-form .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.item-form .form-actions { padding-top: 16px; border-top: 1px solid var(--rule); }
.field > label { font-size: 11px; margin-bottom: 6px; }
.item-form .btn { font-size: 12px; }
.item-mark { width: 17px; height: 17px; }
.ribbon--large { max-width: 540px; margin: 36px 0 8px; }
.ribbon--large .t { height: 20px; }
.ribbon--large .t--due { height: 29px; }
.ribbon--large .t--due::after { font-size: 9px; }
.log { font-size: 12px; }
.log time { font-size: 10px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; background: transparent; border: 1px solid var(--rule); color: var(--ink-2); border-radius: 8px; cursor: pointer; }
.icon-button:hover { background: var(--surface-2); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.dialog-icon { display: inline-flex; padding: 12px; color: var(--accent); background: var(--accent-soft); border-radius: 13px; }
dialog { padding: 28px; border-radius: 18px; box-shadow: 0 24px 100px rgb(0 0 0 / 18%); }
dialog::backdrop { background: rgb(15 25 17 / 45%); backdrop-filter: blur(4px); }
dialog h2 { font-size: 27px; font-weight: 500; letter-spacing: -.8px; }
dialog .hint { font-size: 12px; margin: 10px 0 24px; line-height: 1.8; }
dialog .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
dialog .form-actions { justify-content: flex-end; border-top: 1px solid var(--rule); padding-top: 20px; }
dialog .form-actions .btn--quiet { order: -1; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .stat, .main-nav a, .theme-switch button { transition: background-color 160ms, border-color 160ms, color 160ms; }
}
@media (min-width: 1600px) { :root { --gutter: 48px; } .sidebar { width: 240px; } .app-shell { margin-left: 240px; } }
@media (max-width: 1200px) {
  :root { --gutter: 26px; }
  .sidebar { width: 200px; padding-left: 14px; padding-right: 14px; }
  .app-shell { margin-left: 200px; }
  .stat { padding: 15px; }
  .stat-note { font-size: 9px; }
  .stat-note .icon { display: none; }
  .filters { grid-template-columns: 1.4fr 1fr 1fr; }
  .filters .field:first-child { grid-column: span 2; }
  .filters .field:nth-child(3) { grid-column: 1; }
  .reset-filters { justify-self: start; }
  .focus-card h2 { font-size: 21px; }
  .tracking-card { padding: 23px 20px; }
  .tracking-card .panel-head { flex-wrap: wrap; gap: 5px; }
}
@media (max-width: 900px) {
  .sidebar { width: 76px; padding: 26px 12px 18px; }
  .brand { padding: 0 10px; }
  .brand > span:last-child, .workspace-label, .workspace-note, .appearance-label, .sidebar-caption { display: none; }
  .brand-mark { flex-shrink: 0; }
  .main-nav { margin-top: 45px; }
  .main-nav a { font-size: 0; gap: 0; justify-content: center; position: relative; padding: 13px; }
  .main-nav .nav-count { position: absolute; right: -3px; top: -3px; }
  .theme-switch { flex-direction: column; }
  .theme-switch button { min-height: 38px; }
  .app-shell { margin-left: 76px; }
  .breadcrumb { gap: 8px; }
  .stats { gap: 10px; }
  .stat-top { font-size: 11px; }
  .stat-icon { padding: 5px; }
  .group { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  :root { --gutter: 20px; }
  .sidebar { position: static; width: 100%; padding: 14px 20px 0; display: grid; grid-template-columns: 1fr auto; border-right: 0; border-bottom: 1px solid var(--rule); gap: 14px; }
  .brand { padding: 0; gap: 9px; font-size: 24px; }
  .brand > span:last-child { display: inline; }
  .brand-mark { transform: rotate(-8deg) scale(.8); }
  .sidebar-bottom { grid-column: 2; grid-row: 1; padding: 0; margin: 0; }
  .theme-switch { flex-direction: row; gap: 0; padding: 3px; }
  .theme-switch button { padding: 5px 6px; min-height: 32px; }
  .main-nav { grid-column: 1 / -1; display: flex; gap: 5px; margin: 0; }
  .main-nav a { font-size: 11px; gap: 7px; padding: 10px; border-radius: 8px 8px 0 0; min-height: 42px; flex: 1; }
  .main-nav .nav-count { position: static; margin: 0; min-width: auto; padding: 1px 4px; }
  .main-nav .icon { width: 15px; height: 15px; }
  .app-shell { margin: 0; min-height: calc(100vh - 120px); }
  .topbar { height: 64px; }
  .breadcrumb { font-size: 11px; }
  .breadcrumb > span { display: none; }
  .who strong { max-width: 95px; }
  .editor-avatar { width: 28px; height: 28px; }
  #view { padding-top: 26px; }
  .page-heading { flex-wrap: wrap; align-items: flex-start; gap: 18px; padding-bottom: 24px; }
  .page-heading h1 { font-size: 32px; }
  .heading-actions { width: 100%; }
  .heading-actions .btn--primary { flex: 1; }
  .heading-actions .btn--quiet { flex: 0 0 100px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 16px; }
  .stat-note { font-size: 10px; }
  .stat-value { font-size: 30px; margin-bottom: 11px; }
  .daily-grid { grid-template-columns: 1fr; gap: 16px; margin-top: 20px; }
  .focus-card { min-height: 210px; }
  .tracking-card { padding: 22px; }
  .panel { padding: 20px; }
  .panel-description { display: none; }
  .filters { grid-template-columns: 1fr 1fr; gap: 13px; }
  .filters .field:first-child { grid-column: 1 / -1; }
  .filters .field:nth-child(3) { grid-column: auto; }
  .filters input, .filters select { font-size: 12px; min-height: 40px; }
  .filters .field:last-of-type { grid-column: 1; }
  .table-scroll { margin: 0 -20px; }
  .table-footer { margin: 0 -20px -20px; padding: 14px 20px; }
  .table-footer span:last-child { display: none; }
  .dashboard-note { align-items: flex-start; }
  .dashboard-note .icon { margin-top: 2px; }
  .app-footer { font-size: 9px; padding-top: 10px; }
  .emp-head { padding: 20px; }
  .emp-actions { width: 100%; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .emp-title-main { gap: 12px; }
  .emp-title-main .avatar { width: 44px; height: 44px; }
  .detail-nav { gap: 7px; }
  .detail-nav button { padding: 8px 10px; font-size: 11px; }
  .detail-nav .icon { display: none; }
  .item-form .fields { grid-template-columns: 1fr; }
  .item-form .field--wide { grid-column: auto; }
  .timeline li { grid-template-columns: 1fr auto; }
  .timeline time { grid-column: 1 / -1; }
  .log p, .tl-note, .emp-notes { overflow-wrap: anywhere; }
}
@media (max-width: 450px) {
  .main-nav .nav-count { display: none; }
}
@media (max-width: 380px) {
  .main-nav a { font-size: 10px; padding: 9px 5px; }
  .stat { padding: 12px; }
  .stat-top { font-size: 10px; }
  .stat-note { font-size: 9px; }
  dialog { padding: 20px; }
  dialog .fields { grid-template-columns: 1fr; }
}
@media print {
  .sidebar, .topbar, .heading-actions, .filters, .app-footer, .emp-actions, .detail-nav, .form-actions, .toasts { display: none !important; }
  .app-shell { margin: 0; }
  :root { --paper: white; --surface: white; --ink: black; --ink-2: #333; --ink-3: #555; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .table-scroll { overflow: visible; }
}

/* Readable working text and disclosure affordances. */
.roster { font-size: 12px; }
.sort, .filters label, .panel-description { font-size: 11px; }
.filters input, .filters select { font-size: 12px; }
.employee-link { font-size: 13px; }
.row-sub, .stat-note { font-size: 11px; }
.item > summary { grid-template-columns: 18px 1fr auto 18px; }
.item-chevron { color: var(--ink-3); font-size: 20px; line-height: 20px; text-align: center; }
.item[open] > summary .item-chevron { transform: rotate(180deg); }
@media (max-width: 600px) {
  .item > summary { grid-template-columns: 18px 1fr 18px; }
  .item > summary .chip { grid-column: 2; }
  .item-chevron { grid-column: 3; grid-row: 1; }
}

/* Notes — a shared corner of stationery. */
.notes-heading { padding-bottom: 24px; }
.notes-shared { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border: 1px solid var(--rule); border-radius: 30px; color: var(--ink-2); font-size: 11px; background: var(--surface); }
.notes-shared .icon { width: 15px; height: 15px; }
.notes-composer, .notes-panel {
  --note-butter: #faf3d9;
  --note-sage: #edf2e7;
  --note-peach: #faeae2;
  --note-lilac: #efecf6;
  --note-tape: #d9dfc8;
  --note-line: #e8dfc7;
}
:root[data-theme='dark'] .notes-composer, :root[data-theme='dark'] .notes-panel {
  --note-butter: #343225;
  --note-sage: #29382c;
  --note-peach: #3d302b;
  --note-lilac: #32303f;
  --note-tape: #58654c;
  --note-line: #484432;
}
:root[data-theme='purple-light'] .notes-composer, :root[data-theme='purple-light'] .notes-panel {
  --note-butter: #f3e8fb;
  --note-sage: #edf3ec;
  --note-peach: #fce9f0;
  --note-lilac: #ebe2f8;
  --note-tape: #d5bce7;
  --note-line: #ddcce9;
}
:root[data-theme='purple-dark'] .notes-composer, :root[data-theme='purple-dark'] .notes-panel {
  --note-butter: #382841;
  --note-sage: #2b3b35;
  --note-peach: #432c3c;
  --note-lilac: #352b49;
  --note-tape: #78598e;
  --note-line: #564163;
}
.note-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.notes-composer { position: relative; background: var(--note-butter); border: 1px solid var(--note-line); border-radius: 16px; padding: 24px 28px 20px; box-shadow: 0 4px 0 color-mix(in srgb, var(--note-butter) 70%, var(--rule)); }
.notes-composer::before { content: ''; position: absolute; width: 78px; height: 22px; background: var(--note-tape); opacity: .8; left: calc(50% - 39px); top: -11px; transform: rotate(-3deg); }
.note-composer-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.note-composer-heading h2 { font-size: 17px; font-weight: 600; letter-spacing: -.4px; }
.note-composer-heading p { font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.note-composer-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 44px; flex-shrink: 0; border: 1px solid var(--note-line); border-radius: 9px; background: color-mix(in srgb, var(--surface) 45%, transparent); color: var(--amber); transform: rotate(-7deg); }
.note-sparkle { margin-left: auto; color: var(--amber); font-size: 34px; font-weight: 400; line-height: 1; }
.note-add { display: flex; flex-direction: column; gap: 8px; }
.note-add-field { min-width: 0; }
.note-add textarea { display: block; border: 0; border-radius: 0; padding: 8px 2px 0; font-size: 14px; line-height: 30px; min-height: 99px; background: repeating-linear-gradient(transparent 0, transparent 29px, var(--note-line) 29px, var(--note-line) 30px) 0 8px; }
.note-add textarea:focus-visible { outline-offset: 5px; border-radius: 3px; }
.note-add-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.note-add .btn { font-size: 12px; min-height: 40px; padding: 10px 17px; border-radius: 10px; }
.note-add .btn .icon { width: 16px; height: 16px; }
.note-hint { font-size: 11px; color: var(--ink-2); }
.note-add-hint span { margin: 0 5px; }
.notes-panel { margin-top: 36px; }
.notes-board-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.notes-board-heading > p { font-size: 11px; color: var(--ink-3); }
.notes-board-heading .count-badge { border-radius: 20px; background: var(--surface); min-width: 25px; }
.note-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 16px 0 22px; }
.note-tools .search-input { flex: 0 1 340px; }
.note-tools input[type='search'] { font-size: 12px; min-height: 40px; border-radius: 10px; }
.note-tools .search-input > .icon { top: 12px; }
.note-tools .check { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.note-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 22px 18px; list-style: none; margin: 0; padding: 8px 0 24px; }
.note { --note-color: var(--note-sage); position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 220px; padding: 18px 20px 14px; background: var(--note-color); border: 1px solid color-mix(in srgb, var(--ink) 9%, var(--note-color)); border-radius: 6px 6px 20px 6px; box-shadow: 0 3px 0 color-mix(in srgb, var(--note-color) 70%, var(--rule)); }
.note--peach { --note-color: var(--note-peach); }
.note--butter { --note-color: var(--note-butter); }
.note--lilac { --note-color: var(--note-lilac); }
.note::before { content: ''; position: absolute; width: 48px; height: 16px; top: -9px; left: calc(50% - 24px); background: var(--note-tape); opacity: .75; transform: rotate(-5deg); }
.note:nth-child(even)::before { transform: rotate(5deg); }
.note-card-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 16px; }
.note-status { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 11px; cursor: pointer; }
.note-done { width: 17px; height: 17px; min-height: 17px; flex-shrink: 0; margin: 0; accent-color: var(--accent); cursor: pointer; }
.note-main { min-width: 0; flex: 1; }
.note-body { display: block; width: 100%; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 14px; line-height: 1.75; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; cursor: text; border-radius: 4px; }
.note-body:hover { color: var(--accent); }
.note-meta { margin-top: 16px; font-size: 10px; line-height: 1.7; color: var(--ink-2); overflow-wrap: anywhere; }
.note.is-done { background: var(--surface-2); --note-color: var(--surface-2); box-shadow: none; }
.note.is-done::before { opacity: .4; }
.note.is-done .note-body { color: var(--ink-3); text-decoration: line-through; }
.note-delete { font-size: 10px; min-height: 30px; padding: 5px 7px; border-color: transparent; background: transparent; color: var(--ink-2); }
.note-delete:hover, .note-delete:focus-visible { background: var(--surface); color: var(--red); }
.note-edit-link { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 10px 0 0; margin-top: 14px; border: 0; border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); width: 100%; background: none; color: var(--ink-2); font: inherit; font-size: 11px; cursor: pointer; text-align: left; }
.note-edit-link:hover { color: var(--accent); }
.note-edit-link .icon { width: 13px; height: 13px; }
.note:has(.note-edit) > .note-edit-link { display: none; }
.note-edit textarea { font-size: 14px; line-height: 1.6; min-height: 130px; }
.note-edit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.note-edit-actions .btn { font-size: 12px; }
.note-edit-actions .note-hint { width: 100%; font-size: 10px; }
.note-add-buttons { display: flex; align-items: center; gap: 8px; }
.note-image-pick { position: relative; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.note-image-pick .icon { width: 15px; height: 15px; }
.note-image-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.note-image-pick:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.note-image-tray { display: flex; flex-wrap: wrap; gap: 8px; }
.note-image-tray:not(:empty) { margin-top: 8px; }
.note-image-thumb { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border: 1px solid var(--note-line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.note-image-thumb img { width: 100%; height: 100%; object-fit: cover; }
.note-image-thumb.is-uploading { font-size: 10px; color: var(--ink-3); border-style: dashed; }
.note-image-remove { position: absolute; top: 3px; right: 3px; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--ink) 70%, transparent); color: var(--surface); cursor: pointer; }
.note-image-remove .icon { width: 12px; height: 12px; }
.note-image-remove:hover, .note-image-remove:focus-visible { background: var(--red); }
.note-add.is-dropping, .note-edit.is-dropping { outline: 2px dashed var(--accent); outline-offset: 6px; border-radius: 6px; }
.note-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin-top: 10px; }
.note-images:only-child, .note-main > .note-images:first-child { margin-top: 0; }
.note-image { display: block; border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); border-radius: 6px; overflow: hidden; background: var(--surface); }
.note-image:only-child { grid-column: 1 / -1; }
.note-image img { display: block; width: 100%; height: 100%; max-height: 240px; aspect-ratio: 4 / 3; object-fit: cover; }
.note-image:only-child img { aspect-ratio: auto; object-fit: contain; }
.note-image:hover, .note-image:focus-visible { border-color: var(--accent); }
.note.is-done .note-image img { opacity: .6; }
.note-list .empty-state { grid-column: 1 / -1; border: 1px dashed var(--rule-strong); border-radius: 14px; min-height: 270px; background-image: radial-gradient(var(--rule) .8px, transparent .8px); background-size: 16px 16px; }
.note-empty-art { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 88px; height: 82px; margin-bottom: 8px; background: var(--note-butter); border: 1px solid var(--note-line); border-radius: 4px 4px 17px 4px; transform: rotate(-8deg); box-shadow: 5px 5px 0 var(--accent-soft); }
.note-empty-art::before { content: ''; position: absolute; top: -7px; width: 35px; height: 14px; background: var(--note-tape); opacity: .8; transform: rotate(4deg); }
.note-empty-art span { color: var(--ink-2); font-size: 9px; }
.note-empty-art i { width: 19px; height: 9px; border: 1.5px solid var(--amber); border-top: 0; border-radius: 0 0 15px 15px; margin-top: 8px; }
.notes-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 16px 0 0; border-top: 1px solid var(--rule); color: var(--ink-3); font-size: 11px; }
.notes-footer > span:last-child { display: inline-flex; align-items: center; gap: 7px; }
.notes-footer .icon { width: 14px; height: 14px; }
@media (max-width: 1150px) { .note-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .notes-heading { gap: 12px; padding-bottom: 28px; }
  .notes-shared { font-size: 10px; padding: 5px 10px; }
  .notes-composer { padding: 22px 18px 18px; }
  .note-composer-heading { gap: 10px; }
  .note-composer-heading h2 { font-size: 16px; }
  .note-composer-heading p { font-size: 11px; }
  .note-sparkle { display: none; }
  .note-add textarea, .note-edit textarea, .note-tools input[type='search'] { font-size: 16px; }
  .note-add-footer { justify-content: flex-end; }
  .note-add-hint, .note-edit-actions .note-hint, .notes-board-heading > p { display: none; }
  .notes-panel { margin-top: 30px; }
  .note-tools { gap: 12px; }
  .note-list { gap: 22px 14px; }
  .note { padding: 16px; }
  .notes-footer { align-items: flex-start; flex-direction: column; font-size: 10px; }
}
@media (max-width: 540px) {
  .note-list { grid-template-columns: 1fr; }
  .note { min-height: 200px; }
  .note-tools { flex-wrap: wrap; }
  .note-tools .search-input { flex: 1 1 100%; }
  .note-tools .check { min-height: 30px; }
}
@media print {
  .notes-composer, .note-tools, .note-delete, .note-edit-link { display: none; }
  .note-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .note { break-inside: avoid; }
}
