@font-face {
  font-family: "Neulis Note";
  src: url('/assets/fonts/neulis-thin.woff2') format('woff2');
  font-weight: 100;
  font-display: swap;
}

/* The primary design shares EVA's records and interactions. Its layout follows
   Sorkhi Studio OS: a ruled masthead, narrow rail, tabs and square modules. */
:root.eva-edition {
  --paper: #f8f8f8;
  --surface: #fff;
  --surface-soft: #f4f4f4;
  --line: #dedede;
  --muted: #555;
  --ink: #111;
  --text: #111;
  --olive: #222;
  --olive-dark: #111;
  --accent: #eee;
  --eva-ink: #111;
  --eva-highlight: #8a9a5b;
  --eva-highlight-ink: #556432;
  --eva-highlight-wash: #f0f3e8;
  --radius: 2px;
  --section-gap: clamp(12px, 1.5vw, 20px);
  --masthead-height: 62px;
  background: var(--paper);
  color: var(--ink);
}

.eva-masthead {
  position: sticky;
  inset-block-start: 0;
  z-index: 5;
  min-height: var(--masthead-height);
  padding: 8px clamp(16px, 3vw, 44px);
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.eva-masthead img { width: 66px; height: auto; }
.eva-masthead-caption {
  margin-inline-start: 8px;
  padding-inline-start: 16px;
  border-inline-start: 1px solid var(--line);
  color: var(--muted);
  font-size: .86rem;
}
.eva-masthead .top-date { background: none; padding: 0; font-size: .84rem; }
.eva-version-link {
  border: 1px solid var(--line);
  padding: 5px 10px;
  font-size: .77rem;
  white-space: nowrap;
}
.eva-version-link:hover { border-color: #111; }

.eva-edition .workspace {
  grid-template-columns: 92px minmax(0, 1fr);
  min-height: calc(100vh - var(--masthead-height));
  background:
    radial-gradient(ellipse 54% 430px at 94% 0%, #8a9a5b18, transparent 78%),
    radial-gradient(ellipse 48% 460px at 0% 540px, #8a9a5b12, transparent 78%),
    var(--paper);
}
.eva-edition .sidebar {
  inset-block-start: calc(var(--masthead-height) + 14px);
  block-size: calc(100dvh - var(--masthead-height) - 28px);
  margin: 14px 0;
  padding: 2px 8px;
  border: 0;
  border-inline-end: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.eva-edition .sidebar nav { margin-block-start: 0; }
.eva-edition .sidebar .nav-link {
  min-height: 53px;
  margin-block: 4px;
  padding: 6px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: .74rem;
}
.eva-edition .sidebar .nav-link:hover { background: var(--eva-highlight-wash); color: #111; }
.eva-edition .sidebar .nav-link.selected { background: #eaeaea; color: #111; }
.eva-edition .sidebar .nav-link.selected { border-inline-start-color: #111; }
.eva-edition main { padding-block-start: clamp(22px, 3vw, 42px); }
.eva-edition .page-head { min-height: 0; padding-block-end: 16px; }
.eva-edition .page-head h1 {
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.18;
  font-weight: 810;
}
.eva-edition .page-ghost { display: none; }
.eva-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: clamp(12px, 2vw, 27px);
  row-gap: 3px;
  padding-block: 4px 7px;
}
.eva-note {
  display: block;
  width: max-content;
  margin-inline-end: 4px;
  color: var(--eva-highlight-ink);
  font: 100 clamp(1.1rem, 2vw, 1.7rem)/1.15 "Neulis Note", Georgia, serif;
  transform: rotate(-8deg);
  transform-origin: right center;
}
.eva-note::after {
  content: "";
  display: block;
  width: 52%;
  margin: 2px auto 0;
  border-block-end: 1px solid var(--eva-highlight);
  border-radius: 50%;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .eva-heading:hover .eva-note { animation: eva-note-ink .46s cubic-bezier(.2,.72,.34,1) both; }
  .eva-heading:hover .eva-note::after { animation: eva-note-line .28s .2s ease-out both; }
}
@keyframes eva-note-ink { from { clip-path: inset(-50% 100% -50% 0); } to { clip-path: inset(-50% 0 -50% 0); } }
@keyframes eva-note-line { from { clip-path: inset(-50% 100% -50% 0); } to { clip-path: inset(-50% 0 -50% 0); } }
.eva-edition .section-tabs {
  width: 100%;
  margin-block: 0 var(--section-gap);
  padding: 0;
  column-gap: clamp(12px, 2.6vw, 30px);
  border: 0;
  border-block-end: 1px solid var(--line);
  border-radius: 0;
  background: none;
}
.eva-edition .section-tabs a {
  min-height: 41px;
  padding-inline: 2px;
  border-radius: 0;
  border-block-end: 1px solid transparent;
  margin-block-end: -1px;
}
.eva-edition .section-tabs a[aria-current=page] {
  color: #111;
  border-color: #111;
  background: transparent;
}

.eva-edition :is(.panel, .cash-visual, .product, .lane, .work-card, .agenda-list) {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: none;
}
.eva-edition :is(.button, .record-icon, .month-arrow, .icon-button, input:not([type=checkbox]), select, textarea, dialog, .dialog-head, .order-views, .tag) { border-radius: 2px; }
.eva-edition .button { border-color: var(--line); }
.eva-edition .button.primary { background: #111; border-color: #111; color: #fff; }
.eva-edition .button.primary:hover { background: #333; }
.eva-edition :is(.panel-head, .chart-head, .dialog-head) { border-color: var(--line); }
.eva-edition :is(.panel-head, .chart-head) h2 { font-size: clamp(1.15rem, 1.7vw, 1.55rem); font-weight: 730; }
.eva-edition .overview-metrics { gap: 12px; }
.eva-edition .overview-metrics > :is(a, div) {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
  box-shadow: none;
}
.eva-edition .overview-metrics > :nth-child(3) { border-block-start-color: #111; }
.eva-edition .overview-metrics > a:hover { border-color: #111; }
.eva-edition .overview-metrics > a:hover,
.eva-edition tbody tr:hover { background: var(--eva-highlight-wash); }
.eva-edition .overview-metrics strong { font-weight: 740; font-size: clamp(1.18rem, 2.45vw, 2.2rem); }
.eva-edition .eva-feature { align-items: stretch; margin-bottom: var(--section-gap); }
.eva-feature > :is(.panel, #cash-visual) { margin-bottom: 0; }
.eva-feature .cash-visual { height: 100%; }
.eva-feature #cash-visual:has(.cash-empty) { align-self: start; }
.eva-feature .cash-visual:has(.cash-empty) { height: auto; }
.eva-feature .agenda-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-block: 12px; }
.eva-edition :is(.agenda-days, .range-calendars > div, .cash-selected, .cash-points button[aria-pressed=true], .load-cell) { border-radius: 2px; }
.eva-edition .agenda-days > .agenda-day[aria-pressed=true] { background: #ededed; box-shadow: inset 0 0 0 1px #111; }
.eva-edition .agenda-day[aria-current=date] .day-number { border-color: #111; }
.eva-edition :is(.day-dots, .agenda-key, .agenda-event) i.delivery { background: #111; }
.eva-edition :is(.day-dots, .agenda-key, .agenda-event) i.ceremony { background: #555; border-radius: 0; transform: rotate(45deg); }
.eva-edition :is(.day-dots, .agenda-key, .agenda-event) i.follow { background: transparent; border: 1px solid #555; }
.eva-edition .cash-series.received,
.eva-edition .cash-marker.received { color: var(--eva-highlight-ink); }
.eva-edition .cash-series.spent { color: #686868; }
.eva-edition .cash-series.net,
.eva-edition .cash-marker.net { color: #171717; }
.eva-edition .cash-series.net { stroke-dasharray: 1 4; }
.eva-edition .cash-numbers .received i { background: var(--eva-highlight-ink); }
.eva-edition .cash-numbers .spent i { background: #686868; }
.eva-edition .cash-numbers .net i { background: #171717; }
.eva-edition .cash-series { stroke-width: 2; }
.eva-edition .cash-area { opacity: .35; }
.eva-edition :is(.cash-numbers, .cash-breakdown) { border-color: var(--line); }

.eva-folders {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 12px;
  padding: 24px var(--panel-pad) 16px;
}
.eva-folder {
  position: relative;
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0 2px 8px 8px;
  padding: 12px;
  color: #111;
  background: #fafafa;
  text-align: start;
}
.eva-folder::before {
  content: "";
  position: absolute;
  inset-inline-start: -1px;
  inset-block-end: 100%;
  width: 36%;
  height: 9px;
  border: 1px solid var(--line);
  border-block-end: 0;
  border-radius: 6px 2px 0 0;
  background: inherit;
}
.eva-folder:hover, .eva-folder:hover::before { border-color: #555; }
.eva-folder:hover { background: var(--eva-highlight-wash); }
.eva-folder strong { overflow-wrap: anywhere; font-size: 1rem; }
.eva-folder > bdi, .eva-folder > span { color: var(--muted); font-size: .77rem; }
.eva-folder-footer { display: flex; flex-wrap: wrap; gap: 5px 9px; align-items: center; margin-block-start: 5px; }

.eva-settlement { padding: 14px var(--panel-pad); }
.eva-settlement .overview-metrics { grid-template-columns: repeat(3, minmax(0,1fr)); margin: 0; }
.eva-settlement .overview-metrics > div { background: #fafafa; }
.eva-edition :is(.tag, .agenda-head, .dialog-head, .inline-note, th) { background: #f4f4f4; color: #222; }
.eva-edition :is(.tag.green, .cash-selected, .chart-head .button[aria-pressed=true]) {
  background: var(--eva-highlight-wash);
  color: var(--eva-highlight-ink);
  border-color: #d6dccb;
}
.eva-edition .tag.rose { box-shadow: inset 0 0 0 1px #777; }
.eva-edition :is(.expense-ring, .distribution, .event-scroll, .timeline-grid, .load-grid, .load-key) { filter: grayscale(1); }
.eva-edition .button:not(.primary):hover,
.eva-edition .record-icon:hover { background: var(--eva-highlight-wash); border-color: #9ea68e; }

.eva-login {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 24px;
  background: radial-gradient(ellipse at 80% 16%, #8a9a5b1b, transparent 56%), var(--paper);
}
.eva-login-panel {
  display: grid;
  justify-items: start;
  gap: 13px;
  width: min(100%, 440px);
  padding: clamp(22px, 5vw, 38px);
  border: 1px solid var(--line);
  border-block-start-color: #111;
  background: #fff;
}
.eva-login-panel > img { width: 69px; height: auto; margin-block-end: 13px; }
.eva-login-panel h1 { font-weight: 810; font-size: clamp(1.7rem, 5vw, 2.55rem); }
.eva-login-panel p { color: var(--muted); }
.login-email { font-size: .86rem; overflow-wrap: anywhere; }
.eva-login-panel .login-action { width: 100%; margin-block-start: 8px; }
.eva-login-panel .login-status { font-size: .8rem; }

@media (max-width: 800px) {
  .eva-edition { --masthead-height: 54px; }
  .eva-masthead { padding-inline: 10px; }
  .eva-masthead img { width: 48px; }
  .eva-masthead .top-context { gap: 8px; }
  .eva-edition .sidebar.expanded {
    inset-block-start: var(--masthead-height);
    height: auto;
    max-height: calc(100dvh - var(--masthead-height));
    margin: 0;
    background: #fff;
    border-block-end: 1px solid var(--line);
    border-radius: 0;
    box-shadow: 0 8px 20px #0002;
  }
  .eva-edition .sidebar .nav-link { min-height: 42px; }
  .eva-edition .eva-feature { gap: var(--section-gap); }
}
@media (max-width: 480px) {
  .eva-masthead-caption { display: none; }
  .eva-edition .page-head { padding-block-end: 10px; }
  .eva-edition .eva-folders { grid-template-columns: minmax(0, 1fr); }
  .eva-settlement .overview-metrics { grid-template-columns: minmax(0,1fr); }
  .eva-masthead .top-context { gap: 6px; }
  .eva-version-link { padding-inline: 7px; }
}
