:root {
  color-scheme: light;
  --ink: #1c1a17;
  --muted: #746f66;
  --line: #d8d1c5;
  --paper: #f3efe7;
  --paper-deep: #e9e2d6;
  --white: #fffdf8;
  --night: #171512;
  --night-soft: #25211d;
  --red: #ad2923;
  --red-dark: #7f1d19;
  --green: #3e635a;
  --gold: #ad742c;
  --violet: #625d82;
  --shadow: 0 20px 55px rgb(39 31 20 / 13%);
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Iowan Old Style, Baskerville, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--paper);
}

body {
  min-width: 320px;
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 14%, rgb(173 41 35 / 5%), transparent 28rem),
    var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgb(173 41 35 / 35%);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.loading-screen {
  display: grid;
  min-height: 100vh;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: var(--muted);
  letter-spacing: .08em;
}

.brand-mark,
.wordmark-sign {
  display: grid;
  width: 48px;
  height: 48px;
  color: var(--paper);
  background: var(--red);
  font-family: var(--serif);
  font-size: 30px;
  font-style: italic;
  place-items: center;
}

.loading-screen .brand-mark {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  50% { opacity: .55; transform: scale(.96); }
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1.2fr) minmax(400px, .8fr);
}

.auth-editorial {
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  padding: 52px clamp(40px, 7vw, 110px);
  color: var(--paper);
  background:
    linear-gradient(120deg, rgb(0 0 0 / 40%), transparent 65%),
    radial-gradient(circle at 68% 34%, rgb(173 41 35 / 45%), transparent 34rem),
    var(--night);
  flex-direction: column;
  justify-content: space-between;
}

.auth-editorial::after {
  position: absolute;
  right: -16vw;
  bottom: -38vw;
  width: 67vw;
  height: 67vw;
  border: 1px solid rgb(255 255 255 / 11%);
  border-radius: 50%;
  box-shadow:
    0 0 0 8vw rgb(255 255 255 / 2%),
    0 0 0 16vw rgb(255 255 255 / 2%);
  content: "";
}

.wordmark {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 14px;
  color: inherit;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: .28em;
  text-decoration: none;
}

.auth-copy {
  position: relative;
  z-index: 1;
  max-width: 730px;
  margin-block: 80px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.auth-copy .eyebrow {
  color: #e9958f;
}

.auth-copy h1 {
  max-width: 750px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(50px, 7.3vw, 112px);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: .84;
}

.auth-copy > p:last-child {
  max-width: 550px;
  margin: 38px 0 0;
  color: #c8c0b5;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.55;
}

.edition {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #7e7770;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .22em;
}

.auth-panel {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  padding: 48px clamp(32px, 6vw, 92px);
  background: var(--white);
  place-items: center;
}

.auth-card {
  width: min(100%, 430px);
}

.auth-card h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 400;
  letter-spacing: -.03em;
}

.auth-card > p {
  margin: 0 0 30px;
  color: var(--muted);
  line-height: 1.65;
}

.form-stack {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field > span,
.field-label {
  color: #4f4a43;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .04em;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 3px;
  outline: none;
  padding: 11px 13px;
  color: var(--ink);
  background: var(--white);
  transition: border-color .18s, box-shadow .18s;
}

.field textarea {
  min-height: 110px;
  line-height: 1.5;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgb(173 41 35 / 9%);
}

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

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

.button,
.button-secondary,
.button-ghost,
.button-danger {
  display: inline-flex;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 10px 17px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .035em;
  text-decoration: none;
  transition: transform .15s, background .15s, border-color .15s;
}

.button {
  color: white;
  background: var(--red);
}

.button:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

.button-secondary {
  border-color: var(--line);
  background: var(--white);
}

.button-secondary:hover {
  border-color: #aaa194;
  background: #faf7f0;
}

.button-ghost {
  min-height: 34px;
  padding: 7px 10px;
  color: var(--muted);
  background: transparent;
}

.button-ghost:hover {
  color: var(--ink);
  background: var(--paper-deep);
}

.button-danger {
  color: var(--red);
  border-color: rgb(173 41 35 / 30%);
  background: transparent;
}

.form-message {
  min-height: 21px;
  margin: 0;
  color: var(--red);
  font-size: 13px;
}

.invite-badge {
  display: inline-flex;
  margin-bottom: 20px;
  border: 1px solid #bfcfc8;
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--green);
  background: #edf3f0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.auth-actions {
  display: grid;
  margin: 26px 0 14px;
}

.google-button {
  display: inline-flex;
  min-height: 52px;
  justify-content: center;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.google-mark {
  display: grid;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #3156a3;
  background: white;
  font-family: Arial, sans-serif;
  font-size: 15px;
  font-weight: 800;
  place-items: center;
}

.auth-footnote {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.app-shell {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  padding-top: 72px;
  padding-left: 248px;
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  height: 72px;
  border-bottom: 1px solid #302b26;
  padding: 0 24px;
  color: #eee8dc;
  background: var(--night);
  align-items: center;
}

.wordmark-app {
  width: 224px;
  flex: 0 0 auto;
}

.wordmark-app .wordmark-sign {
  width: 34px;
  height: 34px;
  font-size: 22px;
}

.main-nav {
  display: flex;
  height: 100%;
  align-items: stretch;
  gap: 2px;
}

.main-nav button {
  position: relative;
  border: 0;
  padding: 0 14px;
  color: #a9a198;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.main-nav button:hover,
.main-nav button.active {
  color: white;
}

.main-nav button.active::after {
  position: absolute;
  right: 13px;
  bottom: 0;
  left: 13px;
  height: 3px;
  background: var(--red);
  content: "";
}

.topbar-actions {
  display: flex;
  margin-left: auto;
  align-items: center;
  gap: 10px;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 50%;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-size: 21px;
  place-items: center;
}

.icon-button:hover {
  background: rgb(255 255 255 / 8%);
}

.user-chip {
  min-width: 38px;
  height: 38px;
  border: 1px solid #4d463f;
  border-radius: 50%;
  color: #fff;
  background: #37312b;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.area-sidebar {
  position: fixed;
  z-index: 10;
  top: 72px;
  bottom: 0;
  left: 0;
  display: flex;
  width: 248px;
  border-right: 1px solid var(--line);
  padding: 30px 18px 22px;
  background: #eee8de;
  flex-direction: column;
}

.sidebar-heading {
  display: flex;
  margin: 0 9px 16px;
  color: #797168;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .15em;
}

.sidebar-heading button {
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 20px;
}

.area-list {
  display: grid;
  gap: 4px;
}

.area-button {
  display: flex;
  width: 100%;
  min-height: 43px;
  border: 0;
  border-radius: 4px;
  padding: 8px 10px;
  color: #5c554d;
  background: transparent;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
}

.area-button:hover {
  color: var(--ink);
  background: rgb(255 255 255 / 50%);
}

.area-button.active {
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 5px 17px rgb(44 34 23 / 8%);
}

.area-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--area-color, var(--red));
  flex: 0 0 auto;
}

.area-button strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 730;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 20px 9px 0;
}

.sidebar-bottom p {
  margin: 0 0 18px;
  color: #8a8279;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.45;
}

.sidebar-bottom span {
  color: #9a9187;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .18em;
}

.main-content {
  width: 100%;
  min-width: 0;
  min-height: calc(100vh - 72px);
  overflow: hidden;
  outline: none;
  padding: 48px clamp(28px, 5vw, 76px) 80px;
}

.page-header {
  display: flex;
  margin-bottom: 36px;
  align-items: end;
  justify-content: space-between;
  gap: 25px;
}

.page-header h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(38px, 4.5vw, 65px);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: .95;
}

.page-header p:not(.eyebrow) {
  max-width: 610px;
  margin: 14px 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.5;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 9px;
}

.metric-grid {
  width: 100%;
  min-width: 0;
  display: grid;
  margin-bottom: 26px;
  gap: 1px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--line);
  border: 1px solid var(--line);
}

.metric {
  min-width: 0;
  min-height: 142px;
  overflow: hidden;
  padding: 23px;
  background: var(--white);
}

.metric span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 16px;
  font-family: var(--serif);
  font-size: 50px;
  font-weight: 400;
  letter-spacing: -.04em;
}

.metric small {
  display: block;
  margin-top: 4px;
  color: #969087;
  line-height: 1.35;
}

.dashboard-grid {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 24px;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, .75fr);
}

.panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgb(255 253 248 / 82%);
}

.panel + .panel {
  margin-top: 24px;
}

.panel-header {
  display: flex;
  min-height: 60px;
  border-bottom: 1px solid var(--line);
  padding: 16px 20px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel-header h2,
.panel-header h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
}

.panel-header span {
  color: var(--muted);
  font-size: 11px;
}

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

.list-row {
  display: grid;
  min-width: 0;
  min-height: 67px;
  border-bottom: 1px solid #e5ded3;
  padding: 13px 19px;
  align-items: center;
  gap: 13px;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.list-row:last-child {
  border-bottom: 0;
}

.list-row:hover {
  background: #faf7f0;
}

.status-dot {
  width: 10px;
  height: 10px;
  border: 2px solid var(--red);
  border-radius: 50%;
}

.status-dot.done {
  border-color: var(--green);
  background: var(--green);
}

.list-row-title {
  min-width: 0;
}

.list-row-title strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-row-title small {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-row time {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 13px;
}

.empty-state {
  padding: 42px 25px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
}

.project-grid,
.note-grid,
.file-grid,
.provider-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card,
.note-card,
.file-card,
.provider-card,
.plan-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  padding: 21px;
  background: var(--white);
  transition: transform .16s, box-shadow .16s, border-color .16s;
}

.project-card:hover,
.note-card:hover,
.file-card:hover {
  border-color: #b9afa1;
  box-shadow: 0 12px 30px rgb(37 28 18 / 8%);
  transform: translateY(-2px);
}

.project-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--area-color, var(--red));
  content: "";
}

.card-kicker {
  display: flex;
  margin-bottom: 18px;
  color: var(--muted);
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.project-card h3,
.note-card h3,
.file-card h3,
.provider-card h3,
.plan-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
  line-height: 1.15;
}

.card-description {
  display: -webkit-box;
  overflow: hidden;
  min-height: 42px;
  margin: 12px 0 22px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.progress {
  height: 4px;
  overflow: hidden;
  margin: 15px 0 10px;
  background: var(--paper-deep);
}

.progress > span {
  display: block;
  height: 100%;
  background: var(--green);
}

.card-meta {
  display: flex;
  color: var(--muted);
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
}

.card-actions {
  display: flex;
  margin-top: 17px;
  border-top: 1px solid #e8e1d7;
  padding-top: 12px;
  justify-content: space-between;
  gap: 8px;
}

.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 8px;
  color: #6a6259;
  background: var(--paper-deep);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.badge.red { color: var(--red-dark); background: #f3dedb; }
.badge.green { color: #315348; background: #dfeae5; }
.badge.gold { color: #805316; background: #f1e4cf; }
.badge.violet { color: #4e496f; background: #e6e3ef; }

.toolbar {
  display: flex;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.tabs {
  display: flex;
  gap: 24px;
}

.tab {
  position: relative;
  border: 0;
  padding: 13px 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.tab.active {
  color: var(--ink);
}

.tab.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--red);
  content: "";
}

.task-board {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(4, minmax(230px, 1fr));
}

.task-column {
  min-height: 340px;
  border: 1px solid var(--line);
  background: rgb(237 231 221 / 48%);
}

.task-column-header {
  display: flex;
  border-bottom: 1px solid var(--line);
  padding: 14px;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.task-column-header span {
  display: grid;
  min-width: 23px;
  height: 23px;
  border-radius: 50%;
  color: var(--muted);
  background: var(--white);
  place-items: center;
}

.task-cards {
  display: grid;
  padding: 10px;
  gap: 9px;
}

.task-card {
  border: 1px solid #ddd5c9;
  border-radius: 3px;
  padding: 13px;
  background: var(--white);
}

.task-card:hover {
  border-color: #b7ada0;
}

.task-card h4 {
  margin: 8px 0 12px;
  font-size: 12px;
  line-height: 1.4;
}

.task-card .card-meta {
  font-size: 10px;
}

.task-card select {
  max-width: 112px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.note-card {
  min-height: 205px;
}

.note-card .note-body {
  overflow: hidden;
  max-height: 92px;
  margin: 14px 0 20px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.5;
}

.rich-note-content > :first-child,
.rich-note-detail > :first-child {
  margin-top: 0;
}

.rich-note-content > :last-child,
.rich-note-detail > :last-child {
  margin-bottom: 0;
}

.rich-note-content h2,
.rich-note-content h3 {
  margin: 8px 0 5px;
  font-size: 16px;
}

.rich-note-content p,
.rich-note-content div,
.rich-note-content blockquote,
.rich-note-content ul,
.rich-note-content ol {
  margin: 0 0 7px;
}

.rich-note-detail {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
}

.rich-note-detail h2 {
  margin: 25px 0 10px;
  font-size: 30px;
  font-weight: 400;
}

.rich-note-detail h3 {
  margin: 20px 0 8px;
  font-size: 23px;
  font-weight: 400;
}

.rich-note-detail blockquote {
  margin: 18px 0;
  border-left: 3px solid var(--red);
  padding: 4px 0 4px 18px;
  color: var(--muted);
}

.note-tags {
  margin-top: -6px;
}

.file-card {
  cursor: pointer;
}

.file-card:focus-visible {
  outline: 3px solid rgb(181 40 34 / 22%);
  outline-offset: 2px;
}

.file-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.file-icon {
  display: grid;
  width: 45px;
  height: 55px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  color: var(--red);
  background: var(--paper);
  font-family: var(--serif);
  font-size: 12px;
  place-items: center;
}

.file-control-panel,
.note-control-panel {
  display: grid;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  padding: 15px;
  background: rgb(255 253 248 / 70%);
  align-items: end;
  gap: 12px;
}

.file-control-panel {
  grid-template-columns: minmax(230px, 1.6fr) repeat(3, minmax(130px, .75fr)) auto;
}

.note-control-panel {
  grid-template-columns: minmax(220px, .9fr) minmax(140px, .45fr) 1.2fr;
}

.filter-search,
.filter-field {
  display: grid;
  gap: 7px;
}

.filter-search span,
.filter-field span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.filter-search input,
.filter-field select {
  width: 100%;
  height: 42px;
  border: 1px solid #d6cec2;
  border-radius: 2px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  font-size: 12px;
}

.filter-search input:focus,
.filter-field select:focus {
  border-color: var(--red);
  outline: 2px solid rgb(181 40 34 / 10%);
}

.filter-clear {
  min-height: 42px;
}

.result-heading {
  display: flex;
  margin: 0 0 15px;
  color: var(--muted);
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  font-size: 11px;
}

.result-heading strong {
  color: var(--ink);
  font-size: 12px;
}

.tag-list,
.file-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-list {
  min-height: 25px;
  margin: 4px 0 17px;
}

.tag {
  display: inline-flex;
  min-height: 23px;
  border: 1px solid #ded6ca;
  border-radius: 99px;
  padding: 4px 8px;
  color: #746c63;
  background: #faf7f1;
  align-items: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .02em;
}

.tag.category {
  border-color: #d9b8b4;
  color: #87231e;
  background: #fbefed;
}

.file-stamp {
  display: flex;
  border-top: 1px solid #e5ded3;
  padding-top: 13px;
  color: var(--muted);
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 9px;
}

.file-stamp time {
  text-align: right;
}

.file-detail-meta {
  margin: -5px 0 18px;
  align-items: center;
}

.file-detail-meta time {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
}

.upload-progress {
  display: grid;
  border: 1px solid #d9d0c4;
  padding: 13px;
  background: #faf7f1;
  gap: 9px;
}

.upload-progress-track {
  height: 5px;
  overflow: hidden;
  background: #e5ddd2;
}

.upload-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--red);
  transition: width .12s linear;
}

.upload-progress-copy {
  display: flex;
  color: var(--muted);
  justify-content: space-between;
  font-size: 10px;
}

.upload-progress-copy strong {
  color: var(--ink);
}

.note-kind-tabs {
  align-self: end;
  justify-content: flex-end;
}

.field-help {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.tag-editor {
  display: flex;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 7px 10px;
  background: var(--white);
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  transition: border-color .18s, box-shadow .18s;
}

.tag-editor:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgb(173 41 35 / 9%);
}

.tag-editor-chips {
  display: contents;
}

.tag-editor-chip {
  display: inline-flex;
  min-height: 29px;
  border: 1px solid #d9b8b4;
  border-radius: 99px;
  padding: 4px 5px 4px 10px;
  color: #87231e;
  background: #fbefed;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  animation: tag-pop .14s ease-out;
}

.tag-editor-chip button {
  display: grid;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  color: #87231e;
  background: transparent;
  cursor: pointer;
  place-items: center;
}

.tag-editor-chip button:hover {
  background: rgb(135 35 30 / 10%);
}

.tag-editor input {
  width: auto;
  min-width: 180px;
  min-height: 30px;
  border: 0;
  padding: 3px 2px;
  background: transparent;
  box-shadow: none;
  flex: 1;
}

.tag-editor input:focus {
  border: 0;
  box-shadow: none;
}

@keyframes tag-pop {
  from { transform: scale(.92); }
}

.rich-editor-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--white);
  transition: border-color .18s, box-shadow .18s;
}

.rich-editor-shell:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgb(173 41 35 / 9%);
}

.rich-toolbar {
  display: flex;
  min-height: 47px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding: 7px;
  background: #f7f3ec;
  align-items: center;
  gap: 4px;
}

.rich-toolbar button {
  min-width: 34px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 0 8px;
  color: #514b44;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  white-space: nowrap;
}

.rich-toolbar button:hover,
.rich-toolbar button:focus-visible {
  border-color: #d7cec1;
  color: var(--red);
  background: var(--white);
  outline: none;
}

.rich-toolbar-divider {
  width: 1px;
  height: 22px;
  margin: 0 3px;
  background: var(--line);
  flex: 0 0 auto;
}

.rich-editor {
  min-height: 280px;
  max-height: 55vh;
  overflow-y: auto;
  padding: 19px 21px;
  outline: none;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
}

.rich-editor:empty::before {
  color: #a49c92;
  content: attr(data-placeholder);
  pointer-events: none;
}

.rich-editor h2 {
  margin: 24px 0 10px;
  font-size: 30px;
  font-weight: 400;
}

.rich-editor blockquote {
  margin: 18px 0;
  border-left: 3px solid var(--red);
  padding-left: 16px;
  color: var(--muted);
}

.agenda-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.agenda-row {
  display: grid;
  min-height: 70px;
  border-bottom: 1px solid #e5ded3;
  padding: 13px 18px;
  align-items: center;
  gap: 12px;
  grid-template-columns: 78px 55px minmax(0, 1fr);
}

.agenda-row:last-child {
  border-bottom: 0;
}

.agenda-row time {
  color: var(--red);
  font-family: var(--serif);
  font-size: 13px;
}

.agenda-source {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.agenda-row strong,
.agenda-row small {
  display: block;
}

.agenda-row strong {
  font-size: 12px;
}

.agenda-row small {
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artist-grid,
.release-grid {
  display: grid;
  gap: 17px;
}

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

.artist-card,
.release-card,
.currency-card,
.legal-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--white);
}

.artist-card {
  padding: 22px;
}

.artist-card h3,
.release-card h3,
.legal-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
  line-height: 1.12;
}

.artist-monogram {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 24px;
  color: var(--paper);
  background:
    radial-gradient(circle at 70% 20%, rgb(173 41 35 / 75%), transparent 65%),
    var(--night);
  font-family: var(--serif);
  font-size: 22px;
  place-items: center;
}

.tag-row {
  display: flex;
  min-height: 25px;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 4px 7px;
  color: var(--muted);
  font-size: 9px;
}

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

.release-card {
  display: grid;
  min-height: 260px;
  grid-template-columns: minmax(150px, .65fr) minmax(0, 1.35fr);
}

.release-cover {
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: 260px;
  padding: 17px;
  color: var(--paper);
  background:
    radial-gradient(circle at 90% 20%, rgb(173 41 35 / 70%), transparent 50%),
    linear-gradient(145deg, #0f0e0d, #32201d);
  flex-direction: column;
  justify-content: space-between;
}

.release-cover::after {
  position: absolute;
  right: -50px;
  bottom: -50px;
  width: 170px;
  height: 170px;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 50%;
  content: "";
}

.release-cover span {
  position: relative;
  z-index: 1;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.release-cover strong {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-size: 72px;
  font-style: italic;
  font-weight: 400;
  line-height: .8;
}

.release-content {
  display: flex;
  min-width: 0;
  padding: 22px;
  flex-direction: column;
}

.release-content .card-actions {
  margin-top: auto;
}

.release-meta {
  display: grid;
  margin: 4px 0 19px;
  color: var(--muted);
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  font-size: 10px;
}

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

.currency-summary {
  display: grid;
  margin-bottom: 26px;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.currency-card {
  padding: 20px;
}

.currency-card > strong {
  display: block;
  margin: 8px 0 17px;
  font-family: var(--serif);
  font-size: clamp(27px, 3vw, 42px);
  font-weight: 400;
  letter-spacing: -.04em;
}

.currency-card > div:not(.card-kicker) {
  display: flex;
  color: var(--muted);
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
}

.currency-card > small {
  display: block;
  margin-top: 12px;
  color: #958e84;
  line-height: 1.4;
}

.negative {
  color: var(--red-dark) !important;
}

.positive {
  color: var(--green) !important;
}

.ledger {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--white);
}

.ledger-head,
.ledger-row {
  display: grid;
  align-items: center;
  gap: 14px;
  grid-template-columns: minmax(220px, 1.5fr) minmax(130px, .8fr) 100px 95px 130px 70px;
}

.ledger-head {
  min-width: 790px;
  border-bottom: 1px solid var(--line);
  padding: 13px 17px;
  color: var(--muted);
  background: var(--paper-deep);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.ledger-row {
  min-width: 790px;
  border-bottom: 1px solid #e8e1d7;
  padding: 15px 17px;
  font-size: 11px;
}

.ledger-row:last-child {
  border-bottom: 0;
}

.ledger-row > span:first-child strong,
.ledger-row > span:first-child small,
.ledger-row > span:first-child em {
  display: block;
}

.ledger-row > span:first-child small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.ledger-row > span:first-child strong {
  margin-top: 4px;
  font-size: 12px;
}

.ledger-row > span:first-child em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.money-value {
  text-align: right;
}

.boundary-note {
  margin-top: 22px;
  border-left: 4px solid var(--red);
  padding: 18px 21px;
  color: var(--muted);
  background: var(--white);
}

.boundary-note strong {
  color: var(--ink);
}

.boundary-note p {
  margin: 7px 0 0;
  line-height: 1.6;
}

.legal-board {
  display: grid;
  gap: 12px;
}

.legal-card {
  display: grid;
  padding: 19px;
  align-items: center;
  gap: 20px;
  grid-template-columns: 74px minmax(0, 1fr) auto;
}

.legal-type {
  display: grid;
  min-height: 74px;
  border: 1px solid #c8beb1;
  color: var(--red-dark);
  background: var(--paper);
  font-family: var(--serif);
  font-size: 13px;
  place-items: center;
  text-align: center;
}

.legal-card p {
  margin: 9px 0 15px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.legal-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.legal-dates span,
.legal-dates small {
  display: block;
}

.legal-dates span {
  font-family: var(--serif);
  font-size: 14px;
}

.legal-dates small {
  margin-bottom: 3px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.field small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.planned-shell {
  max-width: 1040px;
}

.plan-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  padding: clamp(30px, 6vw, 70px);
  color: var(--paper);
  background: var(--night);
}

.plan-hero::after {
  position: absolute;
  top: -90px;
  right: -60px;
  width: 330px;
  height: 330px;
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 50%;
  content: "";
}

.plan-hero h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 7vw, 80px);
  font-weight: 400;
  letter-spacing: -.05em;
}

.plan-hero p {
  position: relative;
  z-index: 1;
  max-width: 650px;
  margin: 18px 0 0;
  color: #bdb5aa;
  line-height: 1.6;
}

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

.plan-card p,
.provider-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.provider-card.recommended {
  border-top: 4px solid var(--red);
}

.provider-card ul {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.provider-card .tradeoffs {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

.admin-layout {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.1fr) minmax(310px, .75fr);
}

.admin-layout > div > .panel + .panel {
  margin-top: 24px;
}

.compact-metrics {
  display: grid;
  border-bottom: 1px solid var(--line);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-metrics > span {
  padding: 16px;
  text-align: center;
}

.compact-metrics > span + span {
  border-left: 1px solid var(--line);
}

.compact-metrics strong,
.compact-metrics small {
  display: block;
}

.compact-metrics strong {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
}

.compact-metrics small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.member-row {
  display: grid;
  border-bottom: 1px solid #e6dfd4;
  padding: 15px 20px;
  align-items: center;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.avatar {
  display: grid;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  color: white;
  background: var(--night-soft);
  font-size: 10px;
  font-weight: 800;
  place-items: center;
}

.member-row strong,
.member-row small {
  display: block;
}

.member-row small {
  margin-top: 3px;
  color: var(--muted);
}

.modal {
  width: min(720px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  border: 0;
  padding: 0;
  background: transparent;
}

.modal::backdrop {
  background: rgb(20 17 14 / 72%);
  backdrop-filter: blur(3px);
}

.modal-frame {
  overflow: auto;
  max-height: calc(100vh - 28px);
  border: 1px solid #bfb5a8;
  background: var(--white);
  box-shadow: var(--shadow);
}

.modal-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  min-height: 92px;
  border-bottom: 1px solid var(--line);
  padding: 21px 25px;
  background: rgb(255 253 248 / 96%);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  backdrop-filter: blur(8px);
}

.modal-header h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
}

.modal-header .eyebrow {
  margin-bottom: 5px;
}

.modal-header .icon-button {
  border-color: var(--line);
}

.modal-content {
  padding: 25px;
}

.modal-actions {
  display: flex;
  margin-top: 25px;
  justify-content: flex-end;
  gap: 9px;
}

.preview-frame {
  width: 100%;
  min-height: min(65vh, 620px);
  border: 1px solid var(--line);
  background: #e7e1d7;
}

.preview-media {
  display: block;
  max-width: 100%;
  max-height: 65vh;
  margin: auto;
}

.preview-text {
  overflow: auto;
  max-height: 65vh;
  margin: 0;
  border: 1px solid var(--line);
  padding: 20px;
  background: #f7f3ec;
  font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
}

.comment-list {
  display: grid;
  max-height: 340px;
  overflow: auto;
  margin-bottom: 20px;
  gap: 12px;
}

.comment {
  border-left: 2px solid var(--line);
  padding: 8px 0 8px 13px;
}

.comment header {
  display: flex;
  margin-bottom: 6px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.comment header strong {
  font-size: 12px;
}

.comment header time {
  color: var(--muted);
  font-size: 10px;
}

.comment p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.generated-link {
  overflow-wrap: anywhere;
  margin: 18px 0;
  border: 1px dashed #a9a093;
  padding: 13px;
  color: var(--green);
  background: #edf3f0;
  font: 12px/1.5 ui-monospace, monospace;
}

.invite-area-row {
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
}

.module-checks {
  display: flex;
  margin-top: 9px;
  color: var(--muted);
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 10px;
}

.module-checks > span {
  font-weight: 800;
}

.module-checks label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 22px;
  bottom: 22px;
  display: grid;
  width: min(390px, calc(100vw - 44px));
  gap: 10px;
}

.toast {
  border-left: 4px solid var(--green);
  padding: 14px 16px;
  color: var(--paper);
  background: var(--night);
  box-shadow: var(--shadow);
  font-size: 13px;
  animation: toast-in .22s ease-out;
}

.toast.error {
  border-left-color: var(--red);
}

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

:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid #176f68;
  outline-offset: 2px;
}

.task-control-panel,
.contact-control-panel {
  display: grid;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  padding: 15px;
  background: rgb(255 253 248 / 70%);
  align-items: end;
  gap: 12px;
}

.task-control-panel {
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(130px, .7fr)) auto;
}

.contact-control-panel {
  grid-template-columns: minmax(260px, 1fr) minmax(150px, .25fr);
}

.view-switch {
  display: flex;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--white);
}

.view-switch button {
  min-width: 58px;
  min-height: 40px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.view-switch button.active {
  color: white;
  background: var(--ink);
}

.task-context {
  overflow: hidden;
  margin: -5px 0 10px;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-board {
  grid-template-columns: repeat(5, minmax(218px, 1fr));
}

.task-list-view {
  border: 1px solid var(--line);
  background: var(--white);
}

.task-list-row {
  display: grid;
  min-height: 66px;
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
  align-items: center;
  gap: 15px;
  grid-template-columns: 72px minmax(180px, 1fr) minmax(100px, .45fr) auto minmax(130px, auto);
  color: var(--muted);
  font-size: 11px;
}

.task-list-row:last-child {
  border-bottom: 0;
}

.task-list-row select {
  min-height: 36px;
  border: 1px solid var(--line);
  background: var(--white);
}

.task-title-button {
  display: grid;
  min-height: 42px;
  border: 0;
  padding: 4px 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  gap: 3px;
  text-align: left;
}

.task-title-button small {
  color: var(--muted);
}

.check-field {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 700;
}

.check-field input {
  width: 20px;
  height: 20px;
}

.calendar-toolbar {
  display: flex;
  margin-bottom: 15px;
  color: var(--muted);
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  font-size: 11px;
}

.calendar-navigation {
  display: flex;
  gap: 7px;
}

.calendar-layout {
  display: grid;
  align-items: start;
  gap: 20px;
  grid-template-columns: minmax(620px, 1fr) minmax(280px, .34fr);
}

.month-calendar,
.calendar-agenda {
  border: 1px solid var(--line);
  background: var(--white);
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays span {
  border-right: 1px solid var(--line);
  padding: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  min-width: 0;
  min-height: 118px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 8px;
}

.calendar-day:nth-child(7n) {
  border-right: 0;
}

.calendar-day > time {
  display: grid;
  width: 25px;
  height: 25px;
  margin-bottom: 5px;
  border-radius: 50%;
  font-size: 11px;
  place-items: center;
}

.calendar-day.outside {
  color: #aaa198;
  background: #f4efe7;
}

.calendar-day.today > time {
  color: white;
  background: var(--red);
}

.calendar-event {
  display: block;
  overflow: hidden;
  width: 100%;
  min-height: 24px;
  margin: 3px 0;
  border: 0;
  border-left: 3px solid #8d8174;
  border-radius: 2px;
  padding: 4px 6px;
  color: var(--ink);
  background: #ede7de;
  cursor: pointer;
  font-size: 9px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event.source-calendar { border-left-color: var(--red); }
.calendar-event.source-task { border-left-color: #176f68; }
.calendar-event.source-finance { border-left-color: #a87416; }
.calendar-event.source-legal { border-left-color: #57447f; }

.calendar-day small {
  color: var(--muted);
  font-size: 9px;
}

.calendar-agenda header {
  border-bottom: 1px solid var(--line);
  padding: 17px;
}

.calendar-agenda h2 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
}

.calendar-agenda header span {
  color: var(--muted);
  font-size: 10px;
}

.calendar-agenda ol {
  max-height: 660px;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.calendar-agenda li {
  display: grid;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  gap: 9px;
  grid-template-columns: 74px minmax(0, 1fr);
}

.calendar-agenda li > time {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.calendar-agenda li button {
  display: grid;
  min-height: 36px;
  border: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  gap: 3px;
  text-align: left;
}

.calendar-agenda li small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.search-results {
  display: grid;
  gap: 7px;
}

.search-result {
  display: grid;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 12px;
  color: var(--ink);
  background: var(--white);
  cursor: pointer;
  gap: 5px;
  grid-template-columns: auto minmax(0, 1fr);
  text-align: left;
}

.search-result > span:last-child {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.search-result mark {
  color: inherit;
  background: #f2d9a6;
}

.contact-grid {
  display: grid;
  gap: 13px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-card {
  display: grid;
  min-height: 160px;
  border: 1px solid var(--line);
  padding: 18px;
  background: var(--white);
  align-items: start;
  gap: 14px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
}

.contact-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: white;
  background: var(--ink);
  font-family: var(--serif);
  place-items: center;
}

.contact-card h3 {
  margin: 8px 0 5px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
}

.contact-card p {
  overflow-wrap: anywhere;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
}

.milestone-panel {
  margin-top: 24px;
}

.milestone-list {
  display: grid;
}

.milestone-row {
  display: grid;
  min-height: 64px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 11px 18px;
  color: var(--ink);
  background: transparent;
  align-items: center;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  cursor: pointer;
  text-align: left;
}

.milestone-row:last-child {
  border-bottom: 0;
}

.milestone-row:hover {
  background: #faf7f0;
}

.milestone-row span:nth-child(2) {
  display: grid;
  gap: 3px;
}

.milestone-row small,
.milestone-row time {
  color: var(--muted);
  font-size: 10px;
}

@media (max-width: 1150px) {
  .main-nav button {
    padding-inline: 8px;
    font-size: 11px;
  }

  .project-grid,
  .note-grid,
  .file-grid,
  .provider-grid,
  .artist-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .release-grid {
    grid-template-columns: 1fr;
  }

  .currency-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-board {
    overflow-x: auto;
  }

  .file-control-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-control-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-control-panel .filter-search {
    grid-column: 1 / -1;
  }

  .calendar-layout {
    grid-template-columns: 1fr;
  }

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

  .filter-search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1100px), (max-aspect-ratio: 4 / 5) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-editorial {
    min-height: 44vh;
    min-height: 44svh;
    padding: 30px;
  }

  .auth-copy {
    margin: 50px 0 25px;
  }

  .auth-copy h1 {
    font-size: clamp(48px, 13vw, 78px);
  }

  .auth-copy > p:last-child,
  .edition {
    display: none;
  }

  .auth-panel {
    min-height: 0;
    padding: clamp(56px, 8vh, 96px) 28px 72px;
    place-items: start center;
  }

  .app-shell {
    padding-left: 0;
  }

  .topbar {
    overflow-x: auto;
  }

  .wordmark-app {
    width: auto;
    margin-right: 15px;
  }

  .wordmark-app > span:last-child {
    display: none;
  }

  .area-sidebar {
    position: fixed;
    z-index: 15;
    top: 72px;
    right: 0;
    bottom: auto;
    width: auto;
    height: 54px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 7px 16px;
    flex-direction: row;
  }

  .sidebar-heading,
  .sidebar-bottom {
    display: none;
  }

  .area-list {
    display: flex;
    width: calc(100vw - 32px);
    overflow-x: auto;
    gap: 5px;
  }

  .area-button {
    width: auto;
    min-width: max-content;
    min-height: 38px;
  }

  .main-content {
    padding-top: 88px;
  }

  .dashboard-grid,
  .admin-layout {
    min-width: 0;
    grid-template-columns: 1fr;
  }

  .dashboard-grid > *,
  .admin-layout > * {
    min-width: 0;
  }
}

@media (max-width: 680px), (max-aspect-ratio: 3 / 4) {
  .main-nav {
    order: 3;
    min-width: max-content;
  }

  .topbar {
    gap: 8px;
  }

  .topbar-actions {
    position: sticky;
    right: 0;
    padding-left: 8px;
    background: var(--night);
  }

  .main-content {
    padding-right: 17px;
    padding-left: 17px;
  }

  .page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions {
    justify-content: start;
  }

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

  .project-grid,
  .note-grid,
  .file-grid,
  .provider-grid,
  .artist-grid,
  .release-grid,
  .currency-summary,
  .plan-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .release-card {
    grid-template-columns: 105px minmax(0, 1fr);
  }

  .release-cover {
    min-height: 245px;
  }

  .release-cover strong {
    font-size: 48px;
  }

  .file-control-panel,
  .note-control-panel,
  .task-control-panel,
  .contact-control-panel {
    grid-template-columns: 1fr;
  }

  .filter-search {
    grid-column: auto;
  }

  .task-control-panel .filter-search {
    grid-column: auto;
  }

  .task-list-view {
    overflow-x: auto;
  }

  .task-list-row {
    min-width: 720px;
  }

  .calendar-layout {
    overflow-x: auto;
  }

  .month-calendar {
    min-width: 630px;
  }

  .calendar-agenda {
    min-width: 0;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .contact-card > .button-ghost {
    grid-column: 2;
    justify-self: start;
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .note-kind-tabs {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .file-stamp,
  .result-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .file-stamp time {
    text-align: left;
  }

  .file-detail-meta time {
    width: 100%;
    margin-left: 0;
  }

  .release-content {
    padding: 17px;
  }

  .release-meta {
    grid-template-columns: 1fr;
  }

  .legal-card {
    align-items: stretch;
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .legal-card > .button-ghost {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .legal-type {
    min-height: 56px;
    padding: 5px;
    font-size: 11px;
  }

  .agenda-row {
    grid-template-columns: 66px 44px minmax(0, 1fr);
    padding-inline: 12px;
  }

  .field-span {
    grid-column: auto;
  }

  .modal-content {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
