:root {
  color-scheme: dark;
  --bg: #101322;
  --panel: #1a1d30;
  --plum: #38233e;
  --gold: #d0b176;
  --text: #eee9ee;
  --muted: #aaa8ba;
  --line: #38364c;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 80% 0%, #31203977, transparent 45%), var(--bg);
}
a {
  color: var(--gold);
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 14px;
  background: #25263b;
  color: var(--text);
}
button:hover {
  border-color: var(--gold);
  background: #343047;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button.gold {
  background: var(--gold);
  border-color: var(--gold);
  color: #221b2a;
  font-weight: 650;
}
button.subtle {
  background: transparent;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
input,
textarea,
select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 9px;
  color: var(--text);
  background: #101322aa;
  border: 1px solid var(--line);
}
textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.65;
}
label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 15px 0 6px;
}
input[type="checkbox"] {
  width: auto;
  accent-color: var(--gold);
}
aside {
  width: 246px;
  position: fixed;
  inset: 0 auto 0 0;
  padding: 34px 21px;
  display: flex;
  flex-direction: column;
  background: #181523ed;
  border-right: 1px solid var(--line);
  z-index: 10;
}
.brand {
  font:
    600 20px Georgia,
    serif;
  letter-spacing: 0.13em;
  text-decoration: none;
  color: #ebd4a4;
}
.sigil {
  display: block;
  font-size: 40px;
  margin-bottom: 20px;
  font-weight: normal;
}
.tagline {
  font:
    italic 14px Georgia,
    serif;
  color: var(--muted);
  margin: 12px 0 34px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
nav a {
  color: #bdb6c9;
  text-decoration: none;
  border-radius: 8px;
  padding: 11px 12px;
  display: flex;
  gap: 11px;
  font-size: 14px;
}
nav a.active {
  background: #3a2844;
  color: #edd5a9;
}
nav a:hover {
  background: #2a2337;
}
nav .count {
  margin-left: auto;
  font-size: 11px;
  background: #ffffff0b;
  border-radius: 5px;
  padding: 2px 6px;
}
.aside-foot {
  margin-top: auto;
  font-size: 12px;
  color: var(--gold);
  padding-top: 20px;
}
.aside-foot small {
  display: block;
  color: var(--muted);
  margin: 9px 0;
}
.shell {
  margin-left: 246px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 36px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.header-tools {
  display: flex;
  gap: 12px;
  align-items: center;
}
.header-tools input {
  width: 240px;
}
main {
  max-width: 1260px;
  margin: auto;
  padding: 38px 36px;
  min-height: 80vh;
}
h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}
h1 {
  font-size: 36px;
  margin: 8px 0 12px;
}
h2 {
  font-size: 23px;
  margin: 0 0 12px;
}
h3 {
  font-size: 19px;
  margin: 5px 0 12px;
}
p {
  line-height: 1.65;
}
small,
.muted {
  color: var(--muted);
}
.lead {
  color: var(--muted);
  margin: 0 0 28px;
  font-size: 14px;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.between {
  justify-content: space-between;
}
.end {
  justify-content: flex-end;
}
.hero {
  border: 1px solid #68516e;
  background:
    radial-gradient(circle at 95% 0%, #68516e50, transparent 45%),
    linear-gradient(120deg, #34213e, #1b223a);
  padding: 28px;
  border-radius: 16px;
  position: relative;
}
.hero textarea {
  background: #19172999;
  margin: 12px 0;
  min-height: 90px;
  border-color: #67516e;
}
.hero h2 {
  color: #ecd3a5;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}
.stat,
.panel,
.card {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #202033, #191d30);
  border-radius: 13px;
  padding: 20px;
}
.stat {
  padding: 17px;
}
.stat strong {
  display: block;
  font:
    30px Georgia,
    serif;
  color: var(--gold);
  margin: 8px 0;
}
.stat span {
  font-size: 12px;
  color: var(--muted);
}
.section-label {
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.stack {
  display: grid;
  gap: 12px;
}
.card h3 {
  line-height: 1.4;
}
.card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0;
}
.chip {
  font-size: 11px;
  color: #d3c3dd;
  background: #46334e77;
  border: 1px solid #5c456455;
  padding: 4px 7px;
  border-radius: 6px;
}
.chip.gold {
  color: var(--gold);
  background: #75603c22;
}
.body-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #c4bdce;
  font-size: 14px;
  line-height: 1.7;
}
.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.actions button {
  font-size: 12px;
  padding: 7px 10px;
}
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  border: 1px dashed #4b3c57;
  border-radius: 13px;
}
.empty span {
  display: block;
  font:
    38px Georgia,
    serif;
  color: var(--gold);
  margin-bottom: 12px;
}
.two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
.divider {
  border-top: 1px solid var(--line);
  margin: 18px 0;
}
.list-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.5;
}
.list-item:last-child {
  border-bottom: 0;
}
.list-item button {
  margin-top: 8px;
  font-size: 12px;
}
.progress {
  height: 5px;
  background: #ffffff11;
  border-radius: 10px;
  margin: 16px 0;
}
.progress span {
  height: 100%;
  display: block;
  background: var(--gold);
  border-radius: 10px;
}
details {
  margin: 12px 0;
}
summary {
  cursor: pointer;
  color: var(--gold);
  font-size: 13px;
}
.toolbar {
  margin: 20px 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.toolbar select {
  width: auto;
  max-width: 100%;
}
.lane-title {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin: 22px 0 14px;
}
.subtasks label {
  color: var(--text);
  display: flex;
  gap: 10px;
  align-items: center;
}
.subtasks .done {
  text-decoration: line-through;
  color: var(--muted);
}
dialog {
  background: #1c1b2c;
  color: var(--text);
  border: 1px solid #786084;
  border-radius: 17px;
  width: min(700px, 95vw);
  padding: 25px;
  max-height: 90vh;
}
dialog::backdrop {
  background: #070914cc;
  backdrop-filter: blur(4px);
}
#toast {
  position: fixed;
  bottom: 24px;
  left: calc(50% + 90px);
  transform: translateX(-50%);
  padding: 13px 20px;
  border: 1px solid #8a7293;
  background: #33263e;
  color: #f4e7d1;
  border-radius: 10px;
  display: none;
  z-index: 100;
  max-width: 85vw;
}
#edit-error {
  color: #f4b7ae;
}
.attachments {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.attachment {
  padding: 10px;
  background: #101322;
  border-radius: 8px;
  max-width: 100%;
  font-size: 12px;
}
.attachment img {
  width: 100px;
  height: 90px;
  object-fit: cover;
  display: block;
  margin-bottom: 8px;
}
.history {
  font-size: 12px;
  white-space: pre-wrap;
  color: var(--muted);
  line-height: 1.7;
}
.notice {
  border-left: 2px solid var(--gold);
  padding: 8px 14px;
  background: #d0b1760b;
  font-size: 13px;
  color: #ccc3d1;
}
footer {
  text-align: center;
  font-size: 11px;
  color: #888398;
  padding: 22px;
}
footer span {
  display: block;
  margin: 8px;
}
.file-label {
  display: inline-block;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  color: var(--text);
  margin: 0;
}
.file-label input {
  display: none;
}
.danger {
  color: #f2b8ae;
}
.review-row {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.review-row label {
  display: flex;
  gap: 10px;
}
.date {
  font-size: 11px;
  color: var(--muted);
}
.mobile-menu {
  display: none;
}
@media (min-width: 1400px) {
  main {
    padding-top: 50px;
  }
}
@media (max-width: 1050px) {
  aside {
    width: 210px;
    padding: 28px 14px;
  }
  .shell {
    margin-left: 210px;
  }
  main,
  header {
    padding: 25px;
  }
  .eyebrow {
    display: none;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  aside {
    position: static;
    width: auto;
    padding: 19px 16px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    font-size: 19px;
  }
  .sigil {
    display: inline;
    font-size: 24px;
    margin: 0 8px 0 0;
  }
  .tagline {
    margin: 6px 0 14px;
    font-size: 12px;
  }
  nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 5px;
    padding: 3px 0 9px;
  }
  nav a {
    white-space: nowrap;
    padding: 9px 11px;
    font-size: 12px;
  }
  nav .count {
    display: none;
  }
  .aside-foot {
    display: none;
  }
  .shell {
    margin-left: 0;
  }
  header {
    padding: 14px 16px;
  }
  .header-tools {
    width: 100%;
    gap: 8px;
  }
  .header-tools input {
    width: 100%;
    min-width: 0;
  }
  .header-tools button {
    white-space: nowrap;
  }
  main {
    padding: 23px 16px;
  }
  h1 {
    font-size: 30px;
  }
  .hero {
    padding: 20px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .panel,
  .card {
    padding: 18px;
  }
  .stats {
    gap: 9px;
  }
  .stat {
    padding: 13px;
  }
  .stat strong {
    font-size: 26px;
  }
  #toast {
    left: 50%;
    width: max-content;
  }
  .row.between {
    gap: 14px;
  }
  .grid .panel {
    min-width: 0;
  }
}
@media print {
  aside,
  header,
  footer,
  button,
  .actions,
  .toolbar,
  #toast {
    display: none !important;
  }
  .shell {
    margin: 0;
  }
  body,
  dialog,
  .card {
    background: white !important;
    color: black !important;
  }
  dialog {
    position: static;
    width: 100%;
    max-height: none;
    border: 0;
  }
  dialog[open] ~ * {
    display: none;
  }
  body:has(dialog[open]) main {
    display: none;
  }
  input,
  textarea,
  select {
    color: black;
    background: white;
  }
  textarea {
    height: 250px;
  }
  .muted,
  .history {
    color: #444;
  }
}

@media (max-width: 700px) {
  .aside-foot:has(#install:not([hidden])) {
    display: block;
    padding-top: 6px;
  }
  .aside-foot:has(#install:not([hidden])) > span,
  .aside-foot:has(#install:not([hidden])) > small {
    display: none;
  }
}
