trix-editor {
  border: 1px solid #bbb;
  border-radius: 3px;
  margin: 0;
  padding: 0.4em 0.6em;
  min-height: 5em;
  outline: none; }

trix-toolbar * {
  box-sizing: border-box; }

trix-toolbar .trix-button-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  overflow-x: auto; }

trix-toolbar .trix-button-group {
  display: flex;
  margin-bottom: 10px;
  border: 1px solid #bbb;
  border-top-color: #ccc;
  border-bottom-color: #888;
  border-radius: 3px; }
  trix-toolbar .trix-button-group:not(:first-child) {
    margin-left: 1.5vw; }
    @media (max-width: 768px) {
      trix-toolbar .trix-button-group:not(:first-child) {
        margin-left: 0; } }

trix-toolbar .trix-button-group-spacer {
  flex-grow: 1; }
  @media (max-width: 768px) {
    trix-toolbar .trix-button-group-spacer {
      display: none; } }

trix-toolbar .trix-button {
  position: relative;
  float: left;
  color: rgba(0, 0, 0, 0.6);
  font-size: 0.75em;
  font-weight: 600;
  white-space: nowrap;
  padding: 0 0.5em;
  margin: 0;
  outline: none;
  border: none;
  border-bottom: 1px solid #ddd;
  border-radius: 0;
  background: transparent; }
  trix-toolbar .trix-button:not(:first-child) {
    border-left: 1px solid #ccc; }
  trix-toolbar .trix-button.trix-active {
    background: #cbeefa;
    color: black; }
  trix-toolbar .trix-button:not(:disabled) {
    cursor: pointer; }
  trix-toolbar .trix-button:disabled {
    color: rgba(0, 0, 0, 0.125); }
  @media (max-width: 768px) {
    trix-toolbar .trix-button {
      letter-spacing: -0.01em;
      padding: 0 0.3em; } }

trix-toolbar .trix-button--icon {
  font-size: inherit;
  width: 2.6em;
  height: 1.6em;
  max-width: calc(0.8em + 4vw);
  text-indent: -9999px; }
  @media (max-width: 768px) {
    trix-toolbar .trix-button--icon {
      height: 2em;
      max-width: calc(0.8em + 3.5vw); } }
  trix-toolbar .trix-button--icon::before {
    display: inline-block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0.6;
    content: "";
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain; }
    @media (max-width: 768px) {
      trix-toolbar .trix-button--icon::before {
        right: 6%;
        left: 6%; } }
  trix-toolbar .trix-button--icon.trix-active::before {
    opacity: 1; }
  trix-toolbar .trix-button--icon:disabled::before {
    opacity: 0.125; }

trix-toolbar .trix-button--icon-attach::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10.5%2018V7.5c0-2.25%203-2.25%203%200V18c0%204.125-6%204.125-6%200V7.5c0-6.375%209-6.375%209%200V18%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-miterlimit%3D%2210%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  top: 8%;
  bottom: 4%; }

trix-toolbar .trix-button--icon-bold::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.522%2019.242a.5.5%200%200%201-.5-.5V5.35a.5.5%200%200%201%20.5-.5h5.783c1.347%200%202.46.345%203.24.982.783.64%201.216%201.562%201.216%202.683%200%201.13-.587%202.129-1.476%202.71a.35.35%200%200%200%20.049.613c1.259.56%202.101%201.742%202.101%203.22%200%201.282-.483%202.334-1.363%203.063-.876.726-2.132%201.12-3.66%201.12h-5.89ZM9.27%207.347v3.362h1.97c.766%200%201.347-.17%201.733-.464.38-.291.587-.716.587-1.27%200-.53-.183-.928-.513-1.198-.334-.273-.838-.43-1.505-.43H9.27Zm0%205.606v3.791h2.389c.832%200%201.448-.177%201.853-.497.399-.315.614-.786.614-1.423%200-.62-.22-1.077-.63-1.385-.418-.313-1.053-.486-1.905-.486H9.27Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-italic::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9%205h6.5v2h-2.23l-2.31%2010H13v2H6v-2h2.461l2.306-10H9V5Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-link::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M18.948%205.258a4.337%204.337%200%200%200-6.108%200L11.217%206.87a.993.993%200%200%200%200%201.41c.392.39%201.027.39%201.418%200l1.623-1.613a2.323%202.323%200%200%201%203.271%200%202.29%202.29%200%200%201%200%203.251l-2.393%202.38a3.021%203.021%200%200%201-4.255%200l-.05-.049a1.007%201.007%200%200%200-1.418%200%20.993.993%200%200%200%200%201.41l.05.049a5.036%205.036%200%200%200%207.091%200l2.394-2.38a4.275%204.275%200%200%200%200-6.072Zm-13.683%2013.6a4.337%204.337%200%200%200%206.108%200l1.262-1.255a.993.993%200%200%200%200-1.41%201.007%201.007%200%200%200-1.418%200L9.954%2017.45a2.323%202.323%200%200%201-3.27%200%202.29%202.29%200%200%201%200-3.251l2.344-2.331a2.579%202.579%200%200%201%203.631%200c.392.39%201.027.39%201.419%200a.993.993%200%200%200%200-1.41%204.593%204.593%200%200%200-6.468%200l-2.345%202.33a4.275%204.275%200%200%200%200%206.072Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-strike::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6%2014.986c.088%202.647%202.246%204.258%205.635%204.258%203.496%200%205.713-1.728%205.713-4.463%200-.275-.02-.536-.062-.781h-3.461c.398.293.573.654.573%201.123%200%201.035-1.074%201.787-2.646%201.787-1.563%200-2.773-.762-2.91-1.924H6ZM6.432%2010h3.763c-.632-.314-.914-.715-.914-1.273%200-1.045.977-1.739%202.432-1.739%201.475%200%202.52.723%202.617%201.914h2.764c-.05-2.548-2.11-4.238-5.39-4.238-3.145%200-5.392%201.719-5.392%204.316%200%20.363.04.703.12%201.02ZM4%2011a1%201%200%201%200%200%202h15a1%201%200%201%200%200-2H4Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-quote::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.581%208.471c.44-.5%201.056-.834%201.758-.995C8.074%207.17%209.201%207.822%2010%208.752c1.354%201.578%201.33%203.555.394%205.277-.941%201.731-2.788%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.121-.49.16-.764.294-.286.567-.566.791-.835.222-.266.413-.54.524-.815.113-.28.156-.597.026-.908-.128-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.674-2.7c0-.905.283-1.59.72-2.088Zm9.419%200c.44-.5%201.055-.834%201.758-.995%201.734-.306%202.862.346%203.66%201.276%201.355%201.578%201.33%203.555.395%205.277-.941%201.731-2.789%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.122-.49.16-.764.294-.286.567-.566.791-.835.222-.266.412-.54.523-.815.114-.28.157-.597.026-.908-.127-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.672-2.701c0-.905.283-1.59.72-2.088Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-heading-1::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21.5%207.5v-3h-12v3H14v13h3v-13h4.5ZM9%2013.5h3.5v-3h-10v3H6v7h3v-7Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-code::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.293%2011.293a1%201%200%200%200%200%201.414l4%204a1%201%200%201%200%201.414-1.414L5.414%2012l3.293-3.293a1%201%200%200%200-1.414-1.414l-4%204Zm13.414%205.414%204-4a1%201%200%200%200%200-1.414l-4-4a1%201%200%201%200-1.414%201.414L18.586%2012l-3.293%203.293a1%201%200%200%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-bullet-list::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%207.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203ZM8%206a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-2.5-5a1.5%201.5%200%201%201-3%200%201.5%201.5%200%200%201%203%200ZM5%2019.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-number-list::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%204h2v4H4V5H3V4Zm5%202a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-3.5-7H6v1l-1.5%202H6v1H3v-1l1.667-2H3v-1h2.5ZM3%2017v-1h3v4H3v-1h2v-.5H4v-1h1V17H3Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-undo::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%2014a1%201%200%200%200%201%201h6a1%201%200%201%200%200-2H6.257c2.247-2.764%205.151-3.668%207.579-3.264%202.589.432%204.739%202.356%205.174%205.405a1%201%200%200%200%201.98-.283c-.564-3.95-3.415-6.526-6.825-7.095C11.084%207.25%207.63%208.377%205%2011.39V8a1%201%200%200%200-2%200v6Zm2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-redo::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2014a1%201%200%200%201-1%201h-6a1%201%200%201%201%200-2h3.743c-2.247-2.764-5.151-3.668-7.579-3.264-2.589.432-4.739%202.356-5.174%205.405a1%201%200%200%201-1.98-.283c.564-3.95%203.415-6.526%206.826-7.095%203.08-.513%206.534.614%209.164%203.626V8a1%201%200%201%201%202%200v6Zm-2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-decrease-nesting-level::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-3.707-5.707a1%201%200%200%200%200%201.414l2%202a1%201%200%201%200%201.414-1.414L4.414%2012l1.293-1.293a1%201%200%200%200-1.414-1.414l-2%202Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-button--icon-increase-nesting-level::before {
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-2.293-2.293%202-2a1%201%200%200%200%200-1.414l-2-2a1%201%200%201%200-1.414%201.414L3.586%2012l-1.293%201.293a1%201%200%201%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }

trix-toolbar .trix-dialogs {
  position: relative; }

trix-toolbar .trix-dialog {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  font-size: 0.75em;
  padding: 15px 10px;
  background: #fff;
  box-shadow: 0 0.3em 1em #ccc;
  border-top: 2px solid #888;
  border-radius: 5px;
  z-index: 5; }

trix-toolbar .trix-input--dialog {
  font-size: inherit;
  font-weight: normal;
  padding: 0.5em 0.8em;
  margin: 0 10px 0 0;
  border-radius: 3px;
  border: 1px solid #bbb;
  background-color: #fff;
  box-shadow: none;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none; }
  trix-toolbar .trix-input--dialog.validate:invalid {
    box-shadow: #F00 0px 0px 1.5px 1px; }

trix-toolbar .trix-button--dialog {
  font-size: inherit;
  padding: 0.5em;
  border-bottom: none; }

trix-toolbar .trix-dialog--link {
  max-width: 600px; }

trix-toolbar .trix-dialog__link-fields {
  display: flex;
  align-items: baseline; }
  trix-toolbar .trix-dialog__link-fields .trix-input {
    flex: 1; }
  trix-toolbar .trix-dialog__link-fields .trix-button-group {
    flex: 0 0 content;
    margin: 0; }

trix-editor [data-trix-mutable]:not(.attachment__caption-editor) {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none; }

trix-editor [data-trix-mutable]::-moz-selection,
trix-editor [data-trix-cursor-target]::-moz-selection, trix-editor [data-trix-mutable] ::-moz-selection {
  background: none; }

trix-editor [data-trix-mutable]::selection,
trix-editor [data-trix-cursor-target]::selection, trix-editor [data-trix-mutable] ::selection {
  background: none; }

trix-editor .attachment__caption-editor:focus[data-trix-mutable]::-moz-selection {
  background: highlight; }

trix-editor .attachment__caption-editor:focus[data-trix-mutable]::selection {
  background: highlight; }

trix-editor [data-trix-mutable].attachment.attachment--file {
  box-shadow: 0 0 0 2px highlight;
  border-color: transparent; }

trix-editor [data-trix-mutable].attachment img {
  box-shadow: 0 0 0 2px highlight; }

trix-editor .attachment {
  position: relative; }
  trix-editor .attachment:hover {
    cursor: default; }

trix-editor .attachment--preview .attachment__caption:hover {
  cursor: text; }

trix-editor .attachment__progress {
  position: absolute;
  z-index: 1;
  height: 20px;
  top: calc(50% - 10px);
  left: 5%;
  width: 90%;
  opacity: 0.9;
  transition: opacity 200ms ease-in; }
  trix-editor .attachment__progress[value="100"] {
    opacity: 0; }

trix-editor .attachment__caption-editor {
  display: inline-block;
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
  color: inherit;
  text-align: center;
  vertical-align: top;
  border: none;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none; }

trix-editor .attachment__toolbar {
  position: absolute;
  z-index: 1;
  top: -0.9em;
  left: 0;
  width: 100%;
  text-align: center; }

trix-editor .trix-button-group {
  display: inline-flex; }

trix-editor .trix-button {
  position: relative;
  float: left;
  color: #666;
  white-space: nowrap;
  font-size: 80%;
  padding: 0 0.8em;
  margin: 0;
  outline: none;
  border: none;
  border-radius: 0;
  background: transparent; }
  trix-editor .trix-button:not(:first-child) {
    border-left: 1px solid #ccc; }
  trix-editor .trix-button.trix-active {
    background: #cbeefa; }
  trix-editor .trix-button:not(:disabled) {
    cursor: pointer; }

trix-editor .trix-button--remove {
  text-indent: -9999px;
  display: inline-block;
  padding: 0;
  outline: none;
  width: 1.8em;
  height: 1.8em;
  line-height: 1.8em;
  border-radius: 50%;
  background-color: #fff;
  border: 2px solid highlight;
  box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.25); }
  trix-editor .trix-button--remove::before {
    display: inline-block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0.7;
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg%20height%3D%2224%22%20width%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M19%206.41%2017.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22%2F%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 90%; }
  trix-editor .trix-button--remove:hover {
    border-color: #333; }
    trix-editor .trix-button--remove:hover::before {
      opacity: 1; }

trix-editor .attachment__metadata-container {
  position: relative; }

trix-editor .attachment__metadata {
  position: absolute;
  left: 50%;
  top: 2em;
  transform: translate(-50%, 0);
  max-width: 90%;
  padding: 0.1em 0.6em;
  font-size: 0.8em;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 3px; }
  trix-editor .attachment__metadata .attachment__name {
    display: inline-block;
    max-width: 100%;
    vertical-align: bottom;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; }
  trix-editor .attachment__metadata .attachment__size {
    margin-left: 0.2em;
    white-space: nowrap; }

.trix-content {
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: break-word; }
  .trix-content * {
    box-sizing: border-box;
    margin: 0;
    padding: 0; }
  .trix-content h1 {
    font-size: 1.2em;
    line-height: 1.2; }
  .trix-content blockquote {
    border: 0 solid #ccc;
    border-left-width: 0.3em;
    margin-left: 0.3em;
    padding-left: 0.6em; }
  .trix-content [dir=rtl] blockquote,
  .trix-content blockquote[dir=rtl] {
    border-width: 0;
    border-right-width: 0.3em;
    margin-right: 0.3em;
    padding-right: 0.6em; }
  .trix-content li {
    margin-left: 1em; }
  .trix-content [dir=rtl] li {
    margin-right: 1em; }
  .trix-content pre {
    display: inline-block;
    width: 100%;
    vertical-align: top;
    font-family: monospace;
    font-size: 0.9em;
    padding: 0.5em;
    white-space: pre;
    background-color: #eee;
    overflow-x: auto; }
  .trix-content img {
    max-width: 100%;
    height: auto; }
  .trix-content .attachment {
    display: inline-block;
    position: relative;
    max-width: 100%; }
    .trix-content .attachment a {
      color: inherit;
      text-decoration: none; }
      .trix-content .attachment a:hover, .trix-content .attachment a:visited:hover {
        color: inherit; }
  .trix-content .attachment__caption {
    text-align: center; }
    .trix-content .attachment__caption .attachment__name + .attachment__size::before {
      content: ' \2022 '; }
  .trix-content .attachment--preview {
    width: 100%;
    text-align: center; }
    .trix-content .attachment--preview .attachment__caption {
      color: #666;
      font-size: 0.9em;
      line-height: 1.2; }
  .trix-content .attachment--file {
    color: #333;
    line-height: 1;
    margin: 0 2px 2px 2px;
    padding: 0.4em 1em;
    border: 1px solid #bbb;
    border-radius: 5px; }
  .trix-content .attachment-gallery {
    display: flex;
    flex-wrap: wrap;
    position: relative; }
    .trix-content .attachment-gallery .attachment {
      flex: 1 0 33%;
      padding: 0 0.5em;
      max-width: 33%; }
    .trix-content .attachment-gallery.attachment-gallery--2 .attachment, .trix-content .attachment-gallery.attachment-gallery--4 .attachment {
      flex-basis: 50%;
      max-width: 50%; }
/*

*/

.trix-content .attachment-gallery > action-text-attachment,
.trix-content .attachment-gallery > .attachment {
  flex: 1 0 33%;
  max-width: 33%;
  padding: 0 0.5em;
}

.trix-content .attachment-gallery.attachment-gallery--2 > action-text-attachment,
.trix-content .attachment-gallery.attachment-gallery--2 > .attachment,
.trix-content .attachment-gallery.attachment-gallery--4 > action-text-attachment,
.trix-content .attachment-gallery.attachment-gallery--4 > .attachment {
  flex-basis: 50%;
  max-width: 50%;
}

.trix-content action-text-attachment .attachment {
  max-width: 100% !important;
  padding: 0 !important;
}
/* Application shell */
:root {
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 76px;
  --dashboard-bg: #f4f1ea;
  --dashboard-paper: rgba(255, 255, 255, 0.96);
  --dashboard-ink: #182126;
  --dashboard-muted: #687277;
  --dashboard-line: rgba(24, 33, 38, 0.12);
  --dashboard-accent: #c76a3a;
  --dashboard-accent-dark: #9e4e28;
  --dashboard-green: #24735b;
  --dashboard-red: #a74646;
  --dashboard-shadow: 0 12px 32px rgba(37, 47, 52, 0.11);
  --dashboard-radius: 26px;
  --sidebar-bg: #182126;
  --sidebar-surface: rgba(255, 255, 255, 0.07);
  --sidebar-border: rgba(255, 255, 255, 0.1);
  --sidebar-text: #fffdf9;
  --sidebar-muted: #b7b8b2;
  --sidebar-accent: #c76a3a;
}

body {
  margin: 0;
  min-height: 100vh;
  isolation: isolate;
  color: var(--dashboard-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--dashboard-bg);
}

/* Keep the decorative background on its own fixed paint layer. */
body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 10%, rgba(211, 145, 96, 0.22), transparent 28rem),
    radial-gradient(circle at 90% 12%, rgba(80, 121, 128, 0.18), transparent 24rem),
    linear-gradient(145deg, #f8f5ef 0%, #ece8df 100%);
  transform: translateZ(0);
}

.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--sidebar-text);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  box-shadow: 12px 0 40px rgba(23, 25, 35, 0.12);
  contain: layout paint style;
  z-index: 1040;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  min-height: 48px;
  margin: 0.15rem 0.65rem;
  padding: 0.7rem 0.85rem !important;
  border-radius: 0.75rem;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--sidebar-muted) !important;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link:focus-visible {
  background: var(--sidebar-surface);
  color: var(--sidebar-text) !important;
  transform: translateX(2px);
  outline: none;
}

.sidebar .nav-link.active {
  color: #fff !important;
  background: rgba(199, 106, 58, 0.2);
  box-shadow: inset 3px 0 0 var(--sidebar-accent);
}

.sidebar.collapsed .nav-link {
  justify-content: center;
  margin-inline: 0.55rem;
  padding-inline: 0.5rem !important;
}

.sidebar.collapsed .sidebar-text,
.sidebar.collapsed .nav.flex-column .nav.flex-column {
  display: none;
}

.sidebar .toggle-btn {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 72px;
  padding: 1rem;
  color: var(--sidebar-text);
  background: transparent;
  border: 0;
  text-align: left;
  font-weight: 700;
}

.sidebar.collapsed .toggle-btn {
  display: flex;
  justify-content: center;
  padding-inline: 0.5rem;
}

.sidebar-brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  flex: 0 0 36px;
  border-radius: 0.7rem;
  color: #fff;
  background: linear-gradient(145deg, var(--sidebar-accent), var(--dashboard-accent-dark));
  box-shadow: 0 10px 24px rgba(158, 78, 40, 0.32);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.sidebar-toggle-icon {
  color: var(--sidebar-muted);
  transition: transform 220ms ease;
}

.sidebar.collapsed .sidebar-toggle-icon {
  display: none;
}

.sidebar-divider {
  border-color: var(--sidebar-border);
  opacity: 1;
}

#main-content {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding: clamp(1rem, 2.4vw, 2.5rem) !important;
}

.dashboard-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding-bottom: 3rem;
}

.dashboard-shell.dashboard-shell-wide {
  width: min(1580px, 100%);
}

body.sidebar-collapsed #main-content {
  margin-left: var(--sidebar-collapsed-width);
}

.sidebar-mobile-toggle,
.sidebar-backdrop {
  display: none;
}

@media (max-width: 767.98px) {
  .sidebar {
    width: min(86vw, var(--sidebar-width));
    transform: translateX(-105%);
    transition: transform 160ms cubic-bezier(0.2, 0, 0, 1);
    will-change: transform;
  }

  body.sidebar-mobile-open .sidebar { transform: translateX(0); }

  #main-content,
  body.sidebar-collapsed #main-content {
    margin-left: 0;
    padding-top: 4.75rem !important;
  }

  .sidebar-mobile-toggle {
    display: inline-grid;
    position: fixed;
    top: 0.85rem;
    left: 0.85rem;
    width: 44px;
    height: 44px;
    place-items: center;
    z-index: 1030;
    color: #fff;
    background: var(--sidebar-bg);
    border-radius: 0.8rem;
    box-shadow: 0 8px 24px rgba(23, 25, 35, 0.22);
  }


  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1035;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(20, 20, 28, 0.48);
  }

  body.sidebar-mobile-open .sidebar-backdrop {
    display: block;
  }
}
/* Shared Brady-inspired dashboard components */
h1,
h2 {
  color: var(--dashboard-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.04em;
}

h1 {
  margin-bottom: 1.35rem;
  font-size: clamp(2.15rem, 4.5vw, 3.8rem);
  line-height: 1;
}

h2 {
  letter-spacing: -0.03em;
}

h3,
h4,
h5,
h6 {
  color: var(--dashboard-ink);
  letter-spacing: -0.02em;
}

a {
  color: var(--dashboard-accent-dark);
  text-decoration-color: rgba(158, 78, 40, 0.35);
  text-underline-offset: 0.2em;
}

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

.page {
  min-height: 100vh;
}

.card,
.entry-card,
.search-form {
  background: var(--dashboard-paper) !important;
  border: 1px solid rgba(255, 255, 255, 0.75) !important;
  border-radius: var(--dashboard-radius) !important;
  box-shadow: var(--dashboard-shadow) !important;
}

.card,
.entry-card {
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.card-body,
.entry-card {
  padding: clamp(1.25rem, 2.5vw, 1.8rem);
}

.card-header {
  padding: 1.15rem 1.5rem;
  color: var(--dashboard-ink);
  background: rgba(24, 33, 38, 0.035);
  border-bottom: 1px solid var(--dashboard-line);
  border-radius: var(--dashboard-radius) var(--dashboard-radius) 0 0 !important;
}

.entry-card:hover,
.hover-scale:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(37, 47, 52, 0.14) !important;
}

.search-form {
  margin-bottom: 1.5rem;
  padding: clamp(1.15rem, 2.4vw, 1.65rem);
}

.form-label,
label:not(.form-check-label) {
  margin-bottom: 0.5rem;
  color: var(--dashboard-muted);
  font-size: 0.79rem;
  font-weight: 750;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.form-control,
.form-select,
select,
input[type="text"],
input[type="number"],
input[type="date"],
input[type="file"],
textarea {
  min-height: 46px;
  padding: 0.7rem 0.85rem;
  color: var(--dashboard-ink);
  background-color: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--dashboard-line);
  border-radius: 14px;
  box-shadow: none;
}

textarea.form-control,
textarea {
  min-height: 110px;
}

trix-editor.form-control {
  min-height: 220px;
  padding: 1rem;
  color: var(--dashboard-ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--dashboard-line);
  border-radius: 14px;
}

trix-editor.form-control:focus {
  border-color: rgba(199, 106, 58, 0.65);
  box-shadow: 0 0 0 0.22rem rgba(199, 106, 58, 0.12);
  outline: none;
}

trix-toolbar .trix-button-group {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--dashboard-line);
  border-radius: 10px;
}

.form-control:focus,
.form-select:focus,
select:focus,
input:focus,
textarea:focus {
  border-color: rgba(199, 106, 58, 0.65);
  box-shadow: 0 0 0 0.22rem rgba(199, 106, 58, 0.12);
  outline: none;
}

.btn {
  padding: 0.66rem 1rem;
  border-radius: 14px;
  font-weight: 750;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary,
.btn-success {
  color: #fff;
  background: linear-gradient(145deg, var(--dashboard-accent), var(--dashboard-accent-dark));
  border-color: transparent;
  box-shadow: 0 12px 26px rgba(158, 78, 40, 0.24);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-success:hover,
.btn-success:focus {
  color: #fff;
  background: linear-gradient(145deg, #d27645, var(--dashboard-accent-dark));
  border-color: transparent;
  box-shadow: 0 16px 30px rgba(158, 78, 40, 0.3);
}

.btn-secondary,
.btn-light {
  color: var(--dashboard-ink);
  background: #edf1ef;
  border-color: transparent;
}

.btn-outline-primary {
  color: var(--dashboard-accent-dark);
  border-color: rgba(158, 78, 40, 0.38);
}

.btn-outline-primary:hover {
  color: #fff;
  background: var(--dashboard-accent);
  border-color: var(--dashboard-accent);
}

.btn-danger,
.btn-outline-danger:hover {
  background-color: var(--dashboard-red);
  border-color: var(--dashboard-red);
}

.table {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(24, 33, 38, 0.035);
  overflow: hidden;
  color: var(--dashboard-ink);
  background: var(--dashboard-paper);
  border-color: var(--dashboard-line);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(37, 47, 52, 0.1);
}

.table > :not(caption) > * > * {
  padding: 0.9rem 1rem;
  border-bottom-color: var(--dashboard-line);
}

.table-dark,
.table-dark th {
  color: #fff;
  background: var(--dashboard-ink) !important;
}

.list-group {
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(37, 47, 52, 0.09);
}

.list-group-item {
  padding: 0.9rem 1.1rem;
  background: rgba(255, 255, 255, 0.82);
  border-color: var(--dashboard-line);
}

.badge,
.pill {
  padding: 0.52em 0.8em;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.045em;
}

.bg-success {
  background-color: var(--dashboard-green) !important;
}

.bg-danger {
  background-color: var(--dashboard-red) !important;
}

.alert {
  border: 1px solid var(--dashboard-line);
  border-radius: 16px;
  box-shadow: 0 14px 38px rgba(37, 47, 52, 0.09);
}

.text-muted,
.text-muted.small {
  color: var(--dashboard-muted) !important;
}

/* Quiz source library */
.source-library-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.25rem;
  padding: clamp(0.5rem, 2vw, 1.25rem) 0;
}

.source-library-header h1 {
  margin: 0.8rem 0 0.65rem;
}

.source-library-header p {
  max-width: 630px;
  margin: 0;
  color: var(--dashboard-muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.72rem;
  color: var(--dashboard-accent-dark);
  background: rgba(199, 106, 58, 0.11);
  border-radius: 999px;
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.source-library-add {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  padding: 0.82rem 1.1rem;
}

.source-library-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 540px;
  margin-bottom: 1.5rem;
}

.source-summary-item {
  padding: 0.95rem 1.1rem;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
}

.source-summary-item span {
  display: block;
  color: var(--dashboard-muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.source-summary-item strong {
  display: block;
  margin-top: 0.18rem;
  color: var(--dashboard-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 500;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.15rem;
}

.source-card {
  position: relative;
  display: flex;
  min-height: 360px;
  overflow: hidden;
  flex-direction: column;
  padding: 1.45rem 1.45rem 1.2rem 1.7rem;
  background: var(--dashboard-paper);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--dashboard-radius);
  box-shadow: var(--dashboard-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.source-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(37, 47, 52, 0.15);
}

.source-card-spine {
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: linear-gradient(180deg, var(--dashboard-accent), var(--dashboard-accent-dark));
}

.source-card-topline,
.source-card-actions,
.source-card-tools {
  display: flex;
  align-items: center;
}

.source-card-topline,
.source-card-actions {
  justify-content: space-between;
  gap: 1rem;
}

.source-card-mark {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #fff;
  background: var(--dashboard-ink);
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(24, 33, 38, 0.18);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.05em;
}

.source-card-genre {
  max-width: 65%;
  overflow: hidden;
  padding: 0.45rem 0.65rem;
  color: var(--dashboard-accent-dark);
  background: rgba(199, 106, 58, 0.1);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.source-card-body {
  flex: 1;
  padding: 1.5rem 0 1rem;
}

.source-card-body h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.05;
}

.source-card-body h2 a {
  color: var(--dashboard-ink);
  text-decoration: none;
}

.source-card-body h2 a:hover {
  color: var(--dashboard-accent-dark);
}

.source-card-author,
.source-card-isbn {
  margin: 0.35rem 0;
  color: var(--dashboard-muted);
  line-height: 1.45;
}

.source-card-author {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.source-card-missing {
  font-style: italic;
  opacity: 0.72;
}

.source-card-isbn {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.source-card-stats {
  display: flex;
  gap: 0.55rem;
  padding-bottom: 1rem;
}

.source-card-stats span {
  padding: 0.48rem 0.65rem;
  color: var(--dashboard-muted);
  background: rgba(24, 33, 38, 0.045);
  border: 1px solid rgba(24, 33, 38, 0.05);
  border-radius: 999px;
  font-size: 0.75rem;
}

.source-card-stats strong {
  color: var(--dashboard-ink);
}

.source-card-actions {
  padding-top: 1rem;
  border-top: 1px solid var(--dashboard-line);
}

.source-card-open {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

.source-card-tools {
  gap: 0.4rem;
}

.source-card-tools form {
  display: inline-flex;
}

.source-icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  color: var(--dashboard-muted);
  background: rgba(24, 33, 38, 0.045);
  border: 1px solid transparent;
  border-radius: 11px;
  text-decoration: none;
  transition: 160ms ease;
}

.source-icon-button:hover {
  color: var(--dashboard-ink);
  background: rgba(24, 33, 38, 0.09);
  transform: translateY(-1px);
}

.source-icon-button-danger:hover {
  color: var(--dashboard-red);
  background: rgba(167, 70, 70, 0.1);
}

.source-empty-state {
  padding: clamp(2.5rem, 7vw, 5.5rem) 1.5rem;
  text-align: center;
  background: var(--dashboard-paper);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--dashboard-radius);
  box-shadow: var(--dashboard-shadow);
}

.source-empty-icon {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem;
  place-items: center;
  color: var(--dashboard-accent-dark);
  background: rgba(199, 106, 58, 0.11);
  border-radius: 22px;
  font-size: 1.8rem;
}

.source-empty-state h2 {
  margin: 1rem 0 0.7rem;
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.source-empty-state p {
  max-width: 560px;
  margin: 0 auto 1.5rem;
  color: var(--dashboard-muted);
}

/* Question bank context */
.question-index-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.25rem; padding: .5rem 0; }
.question-index-heading h1 { margin: .7rem 0 .45rem; }
.question-index-heading p { max-width: 680px; margin: 0; color: var(--dashboard-muted); }
.searchable-select { position: relative; }
.searchable-select-native { display: none; }
.searchable-select-trigger { display: flex; align-items: center; justify-content: space-between; gap: .75rem; width: 100%; min-height: 48px; padding: .72rem .9rem .72rem 1rem; color: var(--dashboard-ink); background: rgba(255,255,255,.82); border: 1px solid rgba(24,33,38,.13); border-radius: 14px; box-shadow: 0 4px 14px rgba(37,47,52,.04); font-size: .85rem; font-weight: 700; text-align: left; transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease; }
.searchable-select-trigger:hover { background: #fff; border-color: rgba(199,106,58,.45); }
.searchable-select-trigger:focus-visible, .searchable-select.is-open .searchable-select-trigger { outline: 0; border-color: var(--dashboard-accent); box-shadow: 0 0 0 4px rgba(199,106,58,.12); }
.searchable-select-trigger i { color: var(--dashboard-accent-dark); transition: transform 150ms ease; }
.searchable-select.is-open .searchable-select-trigger > i { transform: rotate(180deg); }
.searchable-select.is-disabled .searchable-select-trigger { color: var(--dashboard-muted); background: rgba(24,33,38,.035); box-shadow: none; cursor: not-allowed; }
.searchable-select-menu { position: absolute; top: calc(100% + .45rem); right: 0; left: 0; z-index: 1040; display: none; min-width: 250px; padding: .55rem; background: var(--dashboard-paper); border: 1px solid rgba(24,33,38,.1); border-radius: 16px; box-shadow: 0 18px 45px rgba(37,47,52,.18); }
.searchable-select.is-open .searchable-select-menu { display: block; }
.searchable-select-search { position: relative; display: block; margin: 0 0 .45rem !important; }
.searchable-select-search i { position: absolute; top: 50%; left: .8rem; color: var(--dashboard-muted); transform: translateY(-50%); }
.searchable-select-search input { width: 100%; min-height: 42px; padding: .6rem .7rem .6rem 2.25rem; color: var(--dashboard-ink); background: rgba(24,33,38,.035); border: 1px solid transparent; border-radius: 11px; font-size: .82rem; }
.searchable-select-search input:focus { outline: 0; background: #fff; border-color: rgba(199,106,58,.4); }
.searchable-select-options { max-height: 250px; overflow-y: auto; }
.searchable-select-option { display: flex; align-items: center; justify-content: space-between; gap: .75rem; width: 100%; padding: .68rem .75rem; color: var(--dashboard-ink); background: transparent; border: 0; border-radius: 10px; font-size: .8rem; text-align: left; }
.searchable-select-option:hover { background: rgba(199,106,58,.08); }
.searchable-select-option i { visibility: hidden; color: var(--dashboard-green); font-size: 1rem; }
.searchable-select-option[aria-selected="true"] { color: var(--dashboard-accent-dark); background: rgba(199,106,58,.1); font-weight: 800; }
.searchable-select-option[aria-selected="true"] i { visibility: visible; }
.searchable-select-empty { margin: .5rem 0; color: var(--dashboard-muted); font-size: .78rem; text-align: center; }
.question-results-context { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1rem 0; }
.question-results-context span { padding: .48rem .7rem; color: var(--dashboard-muted); background: rgba(24,33,38,.045); border: 1px solid rgba(24,33,38,.05); border-radius: 999px; font-size: .75rem; }
.question-results-context strong { color: var(--dashboard-ink); }
.question-empty-state { margin-top: 1rem; padding: clamp(2.5rem, 7vw, 5rem) 1.5rem; text-align: center; background: var(--dashboard-paper); border: 1px solid rgba(255,255,255,.8); border-radius: var(--dashboard-radius); box-shadow: var(--dashboard-shadow); }
.question-empty-state > i { display: grid; width: 66px; height: 66px; margin: 0 auto; place-items: center; color: var(--dashboard-accent-dark); background: rgba(199,106,58,.1); border-radius: 20px; font-size: 1.6rem; }
.question-empty-state h2 { margin: 1rem 0 .4rem; }
.question-empty-state p { color: var(--dashboard-muted); }
.question-math-content { overflow-x: auto; font-size: 1rem; line-height: 1.75; }
.question-math-content mjx-container[display="true"] { margin: 1.15rem 0 !important; padding: .8rem; overflow-x: auto; overflow-y: hidden; background: rgba(24,33,38,.035); border-radius: 14px; }
.question-math-content mjx-container { max-width: 100%; }
.question-math-content p:last-child { margin-bottom: 0; }
.question-study-card { overflow: hidden; margin-bottom: 1.25rem; background: var(--dashboard-paper); border: 1px solid rgba(255,255,255,.82); border-radius: var(--dashboard-radius); box-shadow: var(--dashboard-shadow); }
.question-study-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.3rem; color: var(--dashboard-muted); background: rgba(24,33,38,.028); border-bottom: 1px solid var(--dashboard-line); font-size: .75rem; }
.question-position { letter-spacing: .025em; }
.question-position strong { color: var(--dashboard-ink); font-size: 1rem; }
.question-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .45rem; }
.question-meta span { padding: .38rem .55rem; background: rgba(24,33,38,.05); border-radius: 999px; }
.question-prompt { padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.3rem, 4vw, 2.7rem); color: var(--dashboard-ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.48; letter-spacing: -.018em; }
.question-prompt p { margin: 0; }
.question-prompt mjx-container { font-size: .9em !important; }
.question-attachments { padding: .85rem 1.3rem; color: var(--dashboard-muted); background: rgba(24,33,38,.025); border-top: 1px solid var(--dashboard-line); font-size: .75rem; }
.question-attachments > span { display: block; margin-bottom: .65rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.question-study-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.3rem; border-top: 1px solid var(--dashboard-line); }
.question-select { display: inline-flex; align-items: center; gap: .45rem; margin: 0 !important; color: var(--dashboard-muted); font-size: .7rem !important; letter-spacing: .045em !important; cursor: pointer; }
.question-select input { width: 17px; height: 17px; accent-color: var(--dashboard-accent); }
.question-edit-link { display: inline-flex; align-items: center; gap: .35rem; color: var(--dashboard-muted); font-size: .72rem; font-weight: 800; text-decoration: none; }
.question-edit-link:hover { color: var(--dashboard-accent-dark); }
.question-answer-toggle { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; padding: .85rem 1.3rem; color: var(--dashboard-accent-dark); background: rgba(199,106,58,.055); border: 0; border-top: 1px solid var(--dashboard-line); font-size: .78rem; font-weight: 850; letter-spacing: .025em; text-align: left; }
.question-answer-toggle > span { display: inline-flex; align-items: center; gap: .45rem; }
.question-answer-toggle:hover { background: rgba(199,106,58,.1); }
.question-answer-chevron { transition: transform 160ms ease; }
.question-answer-toggle[aria-expanded="true"] .question-answer-chevron { transform: rotate(180deg); }
.question-answer-toggle-hide { display: none; }
[aria-expanded="true"] .question-answer-toggle-show { display: none; }
[aria-expanded="true"] .question-answer-toggle-hide { display: inline; }
.question-answer { border-top: 1px solid var(--dashboard-line); }
.question-answer-inner { padding: clamp(1.5rem, 3.5vw, 2.35rem); background: linear-gradient(135deg, rgba(36,115,91,.075), rgba(36,115,91,.035)); border-left: 4px solid rgba(36,115,91,.55); }
.question-answer .question-math-content { padding: 0; color: var(--dashboard-ink); font-size: clamp(1.08rem, 1.5vw, 1.2rem); font-weight: 500; line-height: 1.7; }
.question-answer .question-math-content p:last-child { margin-bottom: 0; }
.batch-delete-action { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1025; display: inline-flex; align-items: center; gap: .4rem; box-shadow: 0 16px 36px rgba(167,70,70,.28); }

/* Journal workspace */
.journal-workspace-page { width: 100%; margin: 0 auto; }
.journal-workspace-header { margin-bottom: 2rem; }
.journal-workspace-header h1 { margin: .65rem 0 .4rem; }
.journal-workspace-header p { max-width: 720px; margin: 0; color: var(--dashboard-muted); font-size: 1rem; }
.journal-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.35rem; align-items: start; }
.journal-workspace-main { display: grid; min-width: 0; gap: 1.35rem; }
.journal-workspace-sidebar { display: grid; gap: 1.35rem; }
.journal-search-panel, .journal-compose-panel, .journal-tags-panel, .journal-entries-panel { background: var(--dashboard-paper); border: 1px solid rgba(255,255,255,.8); border-radius: var(--dashboard-radius); box-shadow: var(--dashboard-shadow); }
.journal-search-panel { padding: clamp(1.25rem, 2.5vw, 1.8rem); }
.journal-compose-panel { padding: clamp(1.5rem, 3vw, 2.3rem); }
.journal-tags-panel, .journal-entries-panel { padding: 1.25rem; }
.journal-panel-heading, .journal-sidebar-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.journal-panel-heading { margin-bottom: 1.25rem; }
.journal-panel-heading > i { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; color: var(--dashboard-accent-dark); background: rgba(199,106,58,.1); border-radius: 14px; font-size: 1.15rem; }
.journal-panel-kicker { display: block; margin-bottom: .25rem; color: var(--dashboard-accent-dark); font-size: .68rem; font-weight: 850; letter-spacing: .075em; text-transform: uppercase; }
.journal-panel-heading h2, .journal-sidebar-heading h2 { margin: 0; color: var(--dashboard-ink); }
.journal-panel-heading h2 { font-size: clamp(1.65rem, 3vw, 2.25rem); }
.journal-sidebar-heading { margin-bottom: 1rem; }
.journal-sidebar-heading h2 { font-size: 1.35rem; }
.journal-sidebar-heading > i { color: var(--dashboard-accent-dark); font-size: 1.15rem; }
.journal-count { display: grid; min-width: 34px; height: 34px; padding: 0 .45rem; place-items: center; color: var(--dashboard-accent-dark); background: rgba(199,106,58,.1); border-radius: 11px; font-size: .72rem; font-weight: 850; }
.journal-search-form { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(200px, .8fr) auto; gap: .75rem; align-items: end; }
.journal-search-field { display: block; margin: 0 !important; }
.journal-search-field > span { display: block; margin-bottom: .45rem; color: var(--dashboard-muted); font-size: .68rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.journal-search-field input { width: 100%; min-height: 52px; }
.journal-search-button { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; gap: .45rem; padding-inline: 1.35rem; }
.journal-entry-form .form-group { margin-bottom: 1.25rem !important; }
.journal-content-label { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .45rem; }
.journal-content-label .form-label { margin: 0; }
.journal-insert-image { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .7rem; color: var(--dashboard-accent-dark); background: rgba(199,106,58,.09); border: 1px solid rgba(199,106,58,.16); border-radius: 10px; font-size: .72rem; font-weight: 750; }
.journal-insert-image:hover { background: rgba(199,106,58,.15); }
.journal-inline-help { display: flex; align-items: center; gap: .4rem; margin-top: .55rem; }
.journal-entry-form input[type="text"], .journal-entry-form input[type="file"] { min-height: 52px; }
.journal-entry-form trix-editor.form-control { min-height: clamp(420px, 52vh, 620px); padding: 1.25rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.08rem; line-height: 1.75; }
.journal-entry-form trix-editor h2 { margin: 1.5em 0 .45em; font-family: var(--bs-body-font-family); font-size: 1.7rem; line-height: 1.2; }
.journal-entry-form trix-editor h3 { margin: 1.35em 0 .4em; font-family: var(--bs-body-font-family); font-size: 1.35rem; line-height: 1.25; }
.journal-entry-form trix-editor h4 { margin: 1.2em 0 .35em; font-family: var(--bs-body-font-family); font-size: 1.08rem; line-height: 1.3; }
.journal-entry-form .trix-button[data-journal-heading-level] { width: 2.5rem; background-image: none; font-size: .68rem; font-weight: 850; text-indent: 0; }
.journal-entry-form .trix-button[data-journal-heading-level]::before { display: none; }
.journal-entry-form trix-editor figure.attachment, .journal-document-content figure.attachment { margin: 1.5rem auto; text-align: center; }
.journal-entry-form trix-editor figure.attachment img, .journal-document-content figure.attachment img { display: block; width: auto; max-width: 100%; max-height: 760px; margin: 0 auto; object-fit: contain; border-radius: 12px; box-shadow: 0 12px 32px rgba(24,33,38,.12); }
.journal-entry-form trix-editor figure.attachment figcaption, .journal-document-content figure.attachment figcaption { margin-top: .55rem; color: var(--dashboard-muted); font-family: var(--dashboard-font, inherit); font-size: .72rem; line-height: 1.45; }
.journal-document-content .journal-image-gallery figure.attachment { display: flex; height: 100%; margin: 0; flex-direction: column; justify-content: center; padding: .65rem; background: rgba(24,33,38,.025); border: 1px solid var(--dashboard-line); border-radius: 14px; }
.journal-document-content .journal-image-gallery figure.attachment img { width: 100%; max-height: 520px; flex: 1 1 auto; object-fit: contain; cursor: zoom-in; box-shadow: none; }
.journal-image-gallery-stack figure.attachment { flex: 1 1 0; min-height: 0; }
.journal-image-gallery-stack figure.attachment img { max-height: 250px; }
.journal-document-content figure.attachment > img[role="button"] { cursor: zoom-in; transition: opacity 150ms ease, transform 150ms ease; }
.journal-document-content figure.attachment > img[role="button"]:hover { opacity: .92; transform: scale(1.005); }
.journal-document-content figure.attachment > img[role="button"]:focus-visible { outline: 3px solid rgba(199,106,58,.4); outline-offset: 4px; }
.journal-image-viewer .modal-content { overflow: hidden; background: #111; color: #fff; border: 0; border-radius: 16px; }
.journal-image-viewer .modal-header { background: rgba(255,255,255,.04); }
.journal-image-viewer .modal-title { margin: 0; color: rgba(255,255,255,.78); font-size: .78rem; }
.journal-image-viewer .btn-close { filter: invert(1); }
.journal-image-viewer .modal-body { display: grid; min-height: min(78vh, 900px); place-items: center; }
.journal-image-viewer .modal-body > img { max-height: 78vh; object-fit: contain; }
.journal-image-viewer-previous, .journal-image-viewer-next { display: grid; width: 44px; height: 44px; padding: 0; place-items: center; border-radius: 50%; box-shadow: 0 8px 22px rgba(0,0,0,.25); }
.journal-youtube-card { width: min(100%, 720px); margin: 1.25rem auto; overflow: hidden; background: #111; border-radius: 14px; box-shadow: 0 14px 36px rgba(24,33,38,.2); }
.journal-youtube-card a { position: relative; display: block; color: #fff; text-decoration: none; }
.journal-youtube-card img { display: block; width: 100% !important; max-height: 405px !important; object-fit: cover !important; border-radius: 0 !important; box-shadow: none !important; opacity: .82; }
.journal-youtube-card span { position: absolute; right: 1rem; bottom: 1rem; left: 1rem; display: flex; align-items: center; gap: .55rem; font-family: var(--bs-body-font-family); font-size: .9rem; font-weight: 800; text-shadow: 0 2px 8px #000; }
.journal-youtube-card span b { display: grid; width: 42px; height: 32px; place-items: center; background: #ff0033; border-radius: 9px; text-shadow: none; }
.journal-youtube-card span small { margin-left: auto; color: rgba(255,255,255,.78); font-size: .65rem; }
.journal-youtube-embed { width: min(100%, 860px); margin: 1.75rem auto; aspect-ratio: 16 / 9; overflow: hidden; background: #111; border-radius: 14px; box-shadow: 0 16px 40px rgba(24,33,38,.18); }
.journal-youtube-embed.is-short { width: min(100%, 430px); aspect-ratio: 9 / 16; }
.journal-youtube-embed iframe { display: block; width: 100%; height: 100%; border: 0; }
.journal-entry-form small { color: var(--dashboard-muted); }
.journal-entry-form > .btn { min-height: 50px; padding-inline: 1.4rem; }
.journal-tag-cloud { display: flex; flex-wrap: wrap; gap: .5rem; }
.journal-tag { display: inline-flex; align-items: center; gap: .32rem; padding: .48rem .65rem; color: var(--dashboard-ink); background: rgba(24,33,38,.045); border: 1px solid rgba(24,33,38,.055); border-radius: 999px; font-size: .72rem; font-weight: 750; line-height: 1; text-decoration: none; transition: 150ms ease; }
.journal-tag i { color: var(--dashboard-accent-dark); font-size: .67rem; }
.journal-tag:hover { color: var(--dashboard-accent-dark); background: rgba(199,106,58,.1); border-color: rgba(199,106,58,.15); transform: translateY(-1px); }
.journal-entry-list { display: grid; gap: .75rem; max-height: 68vh; overflow-y: auto; padding-right: .2rem; }
.journal-view-all { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: -.25rem 0 1rem; padding: .7rem .8rem; color: var(--dashboard-accent-dark); background: rgba(199,106,58,.07); border-radius: 11px; font-size: .72rem; font-weight: 800; text-decoration: none; }
.journal-view-all:hover { color: var(--dashboard-accent-dark); background: rgba(199,106,58,.12); }
.journal-entry-preview { padding: 1rem; background: rgba(24,33,38,.025); border: 1px solid var(--dashboard-line); border-radius: 16px; }
.journal-entry-preview time { color: var(--dashboard-muted); font-size: .65rem; font-weight: 750; letter-spacing: .035em; text-transform: uppercase; }
.journal-entry-preview h3 { margin: .35rem 0 .4rem; font-size: 1rem; line-height: 1.3; }
.journal-entry-preview h3 a { color: var(--dashboard-ink); text-decoration: none; }
.journal-entry-preview h3 a:hover { color: var(--dashboard-accent-dark); }
.journal-entry-preview p { margin: 0 0 .7rem; color: var(--dashboard-muted); font-size: .76rem; line-height: 1.55; }
.entry-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.entry-tag { padding: .3rem .48rem; color: var(--dashboard-accent-dark); background: rgba(199,106,58,.08); border-radius: 999px; font-size: .65rem; font-weight: 750; text-decoration: none; }
.journal-sidebar-empty { margin: 0; color: var(--dashboard-muted); font-size: .8rem; line-height: 1.55; }
.journal-reading-page { margin: 0 auto; padding-top: clamp(1.5rem, 3vw, 3rem); padding-bottom: 4rem; }
.journal-reading-progress { position: fixed; top: 0; right: 0; left: 0; z-index: 1100; height: 4px; overflow: hidden; background: rgba(24,33,38,.08); pointer-events: none; }
.journal-reading-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--dashboard-accent), var(--dashboard-accent-dark)); transition: width 100ms linear; }
.journal-outline-column { top: 1.25rem; z-index: 10; }
.journal-outline { padding: 1rem; background: rgba(255,254,250,.82); border: 1px solid rgba(24,33,38,.08); border-radius: 16px; box-shadow: 0 12px 32px rgba(37,47,52,.08); backdrop-filter: blur(12px); }
.journal-outline summary { display: flex; align-items: center; gap: .45rem; color: var(--dashboard-ink); font-size: .75rem; font-weight: 850; cursor: pointer; list-style: none; }
.journal-outline summary::-webkit-details-marker { display: none; }
.journal-outline summary i { color: var(--dashboard-accent-dark); }
.journal-outline nav { margin-top: .75rem; }
.journal-outline a { display: block; overflow: hidden; padding: .45rem .55rem; color: var(--dashboard-muted); border-left: 2px solid transparent; border-radius: 0 8px 8px 0; font-size: .69rem; line-height: 1.35; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; transition: 140ms ease; }
.journal-outline a:hover, .journal-outline a.is-active { color: var(--dashboard-accent-dark); background: rgba(199,106,58,.07); border-left-color: var(--dashboard-accent); }
.journal-outline .journal-outline-level-3 { padding-left: 1rem; }
.journal-outline .journal-outline-level-4 { padding-left: 1.5rem; font-size: .64rem; }
.journal-back-link { display: inline-flex; align-items: center; gap: .45rem; color: var(--dashboard-muted); font-size: .82rem; font-weight: 800; text-decoration: none; }
.journal-back-link:hover { color: var(--dashboard-accent-dark); }
.journal-document-nav .btn { display: inline-flex; align-items: center; gap: .45rem; }
.journal-document { width: 100%; min-width: 0; min-height: 1120px; padding: clamp(2rem, 3vw, 3.5rem) clamp(1.5rem, 3vw, 3.5rem); background: #fffefa; border: 1px solid rgba(24,33,38,.08); border-radius: 5px; box-shadow: 0 22px 55px rgba(37,47,52,.14); }
.journal-document-header { padding-bottom: 1.65rem; border-bottom: 1px solid var(--dashboard-line); }
.journal-document-kicker { display: block; margin-bottom: .7rem; color: var(--dashboard-accent-dark); font-size: .7rem; font-weight: 850; letter-spacing: .085em; text-transform: uppercase; }
.journal-document-header h1 { margin: 0 0 1rem; font-size: clamp(2.5rem, 5vw, 4.4rem); line-height: 1.05; }
.journal-document-dates { display: flex; flex-wrap: wrap; gap: .65rem 1.25rem; margin-top: 1.25rem; color: var(--dashboard-muted); font-size: .75rem; }
.journal-document-dates span { display: inline-flex; align-items: center; gap: .4rem; }
.journal-document-content { padding: clamp(2rem, 5vw, 4rem) 0; color: var(--dashboard-ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.12rem, 1.55vw, 1.28rem); line-height: 1.85; }
.journal-document-content h1, .journal-document-content h2, .journal-document-content h3, .journal-document-content h4 { margin: 1.6em 0 .55em; color: var(--dashboard-ink); font-family: var(--bs-body-font-family); line-height: 1.25; scroll-margin-top: 2rem; }
.journal-document-content h2 { font-size: clamp(1.7rem, 3vw, 2.25rem); }
.journal-document-content h3 { font-size: clamp(1.35rem, 2.3vw, 1.7rem); }
.journal-document-content h4 { font-size: clamp(1.05rem, 1.8vw, 1.25rem); }
.journal-document-content h1:first-child, .journal-document-content h2:first-child, .journal-document-content h3:first-child, .journal-document-content h4:first-child { margin-top: 0; }
.journal-document-content p { margin-bottom: 1.15em; }
.journal-document-content ul, .journal-document-content ol { padding-left: 1.5em; }
.journal-document-content img { max-width: 100%; height: auto; }
.journal-document-attachments { padding-top: 1.5rem; border-top: 1px solid var(--dashboard-line); }
.journal-document-attachments h2 { display: flex; align-items: center; gap: .5rem; margin: 0 0 1rem; font-size: 1.35rem; }
.journal-attachment-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .85rem; }
.journal-attachment { overflow: hidden; background: rgba(24,33,38,.035); border: 1px solid var(--dashboard-line); border-radius: 14px; }
.journal-attachment img, .journal-attachment video { display: block; width: 100%; max-height: 440px; object-fit: contain; }
.journal-attachment audio { width: calc(100% - 1.5rem); margin: .75rem; }
.journal-file-link { display: flex; align-items: center; gap: .65rem; padding: 1rem; color: var(--dashboard-ink); font-weight: 750; text-decoration: none; }
.journal-file-link i { color: var(--dashboard-accent-dark); font-size: 1.25rem; }
.journal-version-history { margin-top: 1rem; padding: 1rem 1.2rem; background: rgba(255,254,250,.88); border: 1px solid var(--dashboard-line); border-radius: 14px; }
.journal-version-history summary { display: flex; align-items: center; gap: .5rem; color: var(--dashboard-ink); font-size: .82rem; font-weight: 800; cursor: pointer; list-style: none; }
.journal-version-history summary span { display: grid; min-width: 25px; height: 25px; margin-left: auto; padding: 0 .35rem; place-items: center; color: var(--dashboard-accent-dark); background: rgba(199,106,58,.1); border-radius: 8px; font-size: .67rem; }
.journal-version-history > ol { margin: 1rem 0 0; padding-left: 1.25rem; }
.journal-version-history time { display: block; color: var(--dashboard-muted); font-size: .72rem; }
.journal-archive-page { width: 100%; padding: 1rem 0 4rem; }
.journal-archive-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 1.5rem; }
.journal-archive-header h1 { margin: .7rem 0 .4rem; }
.journal-archive-header p { max-width: 680px; margin: 0; color: var(--dashboard-muted); }
.journal-archive-header .btn { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .45rem; }
.journal-archive-filters { padding: 1.25rem; background: var(--dashboard-paper); border: 1px solid rgba(255,255,255,.8); border-radius: var(--dashboard-radius); box-shadow: var(--dashboard-shadow); }
.journal-archive-form { display: grid; grid-template-columns: minmax(260px, 1.6fr) minmax(170px, .7fr) minmax(150px, .55fr) minmax(150px, .55fr) auto; gap: .75rem; align-items: end; }
.journal-archive-form label { display: block; margin: 0 !important; }
.journal-archive-form label > span { display: block; margin-bottom: .45rem; color: var(--dashboard-muted); font-size: .67rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.journal-archive-form input, .journal-archive-form select, .journal-archive-form .btn { width: 100%; min-height: 50px; }
.journal-archive-form .btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.journal-archive-search { position: relative; }
.journal-archive-search > i { position: absolute; bottom: 1rem; left: .95rem; color: var(--dashboard-muted); }
.journal-archive-search input { padding-left: 2.55rem; }
.journal-quick-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--dashboard-line); }
.journal-quick-filters > span { margin-right: .2rem; color: var(--dashboard-muted); font-size: .67rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.journal-quick-filter { padding: .48rem .7rem; color: var(--dashboard-muted); background: rgba(24,33,38,.045); border: 1px solid transparent; border-radius: 999px; font-size: .72rem; font-weight: 750; text-decoration: none; }
.journal-quick-filter:hover, .journal-quick-filter.is-active { color: var(--dashboard-accent-dark); background: rgba(199,106,58,.1); border-color: rgba(199,106,58,.13); }
.journal-clear-filters { margin-left: auto; color: var(--dashboard-red); font-size: .72rem; font-weight: 750; text-decoration: none; }
.journal-archive-summary { display: flex; align-items: center; justify-content: space-between; margin: 1.4rem 0 .8rem; }
.journal-archive-summary p { margin: 0; color: var(--dashboard-muted); font-size: .8rem; }
.journal-archive-summary strong { color: var(--dashboard-ink); font-size: 1rem; }
.journal-archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.journal-archive-card { display: flex; min-height: 275px; flex-direction: column; padding: 1.35rem; background: var(--dashboard-paper); border: 1px solid rgba(255,255,255,.8); border-radius: 20px; box-shadow: 0 12px 32px rgba(37,47,52,.08); transition: transform 160ms ease, box-shadow 160ms ease; }
.journal-archive-card:hover { transform: translateY(-2px); box-shadow: 0 17px 38px rgba(37,47,52,.12); }
.journal-archive-card time { color: var(--dashboard-accent-dark); font-size: .66rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.journal-archive-card h2 { margin: .65rem 0 .55rem; font-size: clamp(1.35rem, 2vw, 1.75rem); line-height: 1.15; }
.journal-archive-card h2 a { color: var(--dashboard-ink); text-decoration: none; }
.journal-archive-card > p { flex: 1; margin: 0 0 1.15rem; color: var(--dashboard-muted); font-size: .8rem; line-height: 1.65; }
.journal-archive-card footer { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem; padding-top: .9rem; border-top: 1px solid var(--dashboard-line); }
.journal-archive-open { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; color: #fff; background: var(--dashboard-ink); border-radius: 11px; text-decoration: none; }
.journal-archive-open:hover { color: #fff; background: var(--dashboard-accent-dark); }
.journal-archive-empty { padding: clamp(3rem, 8vw, 6rem) 1.5rem; text-align: center; background: var(--dashboard-paper); border-radius: var(--dashboard-radius); box-shadow: var(--dashboard-shadow); }
.journal-archive-empty > i { color: var(--dashboard-accent); font-size: 2rem; }
.journal-archive-empty h2 { margin: .8rem 0 .4rem; }
.journal-archive-empty p { color: var(--dashboard-muted); }

/* Home command centre */
.home-dashboard { width: 100%; padding: 1rem 0 4rem; }
.home-hero { display: flex; min-height: 245px; align-items: center; justify-content: space-between; gap: 2rem; margin-bottom: 1.25rem; padding: clamp(1.6rem, 4vw, 3.4rem); overflow: hidden; color: #fff; background: linear-gradient(128deg, #182126 0%, #26353a 62%, #355248 100%); border-radius: 30px; box-shadow: 0 22px 50px rgba(24,33,38,.2); }
.home-hero .eyebrow { color: rgba(255,255,255,.72); background: rgba(255,255,255,.08); }
.home-hero h1 { margin: .8rem 0 .4rem; color: #fff; font-size: clamp(3rem, 6vw, 5.6rem); line-height: .95; }
.home-hero p { max-width: 620px; margin: 0; color: rgba(255,255,255,.68); font-size: 1rem; }
.home-date-mark { display: grid; width: 130px; height: 145px; flex: 0 0 auto; place-items: center; align-content: center; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.12); border-radius: 26px; box-shadow: inset 0 1px rgba(255,255,255,.08); }
.home-date-mark strong { font-family: Georgia, "Times New Roman", serif; font-size: 4.4rem; font-weight: 500; line-height: .9; }
.home-date-mark span { margin-top: .45rem; color: rgba(255,255,255,.65); font-size: .72rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.home-quick-actions, .home-attention-panel, .home-activity-panel { padding: 1.3rem; background: var(--dashboard-paper); border: 1px solid rgba(255,255,255,.8); border-radius: var(--dashboard-radius); box-shadow: var(--dashboard-shadow); }
.home-quick-actions { margin-bottom: 1.25rem; }
.home-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.home-section-heading span { display: block; margin-bottom: .2rem; color: var(--dashboard-accent-dark); font-size: .66rem; font-weight: 850; letter-spacing: .075em; text-transform: uppercase; }
.home-section-heading h2 { margin: 0; font-size: clamp(1.35rem, 2.5vw, 1.85rem); }
.home-section-heading > a { font-size: .72rem; font-weight: 800; text-decoration: none; }
.home-action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .7rem; }
.home-quick-action { display: grid; min-width: 0; grid-template-columns: 40px minmax(0, 1fr) auto; gap: .7rem; align-items: center; padding: .85rem; color: var(--dashboard-ink); background: rgba(24,33,38,.03); border: 1px solid var(--dashboard-line); border-radius: 15px; text-decoration: none; transition: background 150ms ease, border-color 150ms ease; }
.home-quick-action:hover { color: var(--dashboard-ink); background: rgba(199,106,58,.07); border-color: rgba(199,106,58,.18); }
.home-quick-action > i:first-child { display: grid; width: 40px; height: 40px; place-items: center; color: var(--dashboard-accent-dark); background: rgba(199,106,58,.1); border-radius: 12px; }
.home-quick-action > i:last-child { color: var(--dashboard-muted); font-size: .75rem; }
.home-quick-action strong, .home-quick-action small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-quick-action strong { font-size: .78rem; }
.home-quick-action small { margin-top: .12rem; color: var(--dashboard-muted); font-size: .65rem; }
.home-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; }
.home-dashboard-main { display: grid; min-width: 0; gap: 1.25rem; }
.home-attention-list { display: grid; gap: .55rem; }
.home-attention-item { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: .75rem; align-items: center; padding: .8rem; color: var(--dashboard-ink); background: rgba(24,33,38,.025); border: 1px solid var(--dashboard-line); border-radius: 14px; text-decoration: none; }
.home-attention-item:hover { color: var(--dashboard-ink); background: rgba(199,106,58,.06); }
.home-attention-icon { display: grid; width: 42px; height: 42px; place-items: center; color: var(--dashboard-accent-dark); background: rgba(199,106,58,.1); border-radius: 12px; }
.home-attention-item.is-overdue .home-attention-icon { color: var(--dashboard-red); background: rgba(167,70,70,.1); }
.home-attention-item strong, .home-attention-item small { display: block; }
.home-attention-item strong { font-size: .82rem; }
.home-attention-item small { margin-top: .15rem; color: var(--dashboard-muted); font-size: .68rem; }
.home-attention-item b { font-size: .8rem; }
.home-attention-item > form { display: flex; }
.home-todo-check { display: grid; width: 42px; height: 42px; padding: 0; place-items: center; color: var(--dashboard-accent-dark); background: rgba(199,106,58,.1); border: 0; border-radius: 12px; font-size: 1.05rem; }
.home-attention-item.is-overdue .home-todo-check { color: var(--dashboard-red); background: rgba(167,70,70,.1); }
.home-todo-check:hover { color: #fff; background: var(--dashboard-green); }
.home-todo-copy { min-width: 0; color: var(--dashboard-ink); text-decoration: none; }
.home-todo-copy:hover strong { color: var(--dashboard-accent-dark); }
.home-todo-priority { padding: .35rem .55rem; color: var(--dashboard-muted); background: rgba(24,33,38,.05); border-radius: 999px; font-size: .64rem !important; text-transform: uppercase; }
.home-all-clear { display: flex; align-items: center; gap: .8rem; padding: 1rem; color: var(--dashboard-green); background: rgba(36,115,91,.07); border-radius: 15px; }
.home-all-clear > i { font-size: 1.4rem; }
.home-all-clear strong, .home-all-clear small { display: block; }
.home-all-clear small { margin-top: .15rem; color: var(--dashboard-muted); font-size: .7rem; }
.home-module-section { padding-top: .25rem; }
.home-module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.home-module-card { display: flex; min-height: 210px; flex-direction: column; padding: 1.25rem; color: var(--dashboard-ink); background: var(--dashboard-paper); border: 1px solid rgba(255,255,255,.8); border-radius: 20px; box-shadow: 0 12px 30px rgba(37,47,52,.08); text-decoration: none; }
.home-module-card:hover { color: var(--dashboard-ink); box-shadow: 0 16px 36px rgba(37,47,52,.12); }
.home-module-card header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.home-module-card header span { display: inline-flex; align-items: center; gap: .45rem; font-size: .72rem; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; }
.home-module-card header span i { color: var(--dashboard-accent-dark); }
.home-module-card header > i { color: var(--dashboard-muted); }
.home-module-card > strong { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.8rem, 3.5vw, 2.7rem); font-weight: 500; line-height: 1.05; }
.home-module-card > small { margin-top: .25rem; color: var(--dashboard-muted); font-size: .7rem; }
.home-module-card > div { display: flex; flex-wrap: wrap; gap: .45rem 1rem; margin-top: auto; padding-top: 1rem; color: var(--dashboard-muted); border-top: 1px solid var(--dashboard-line); font-size: .67rem; }
.home-module-card > div span { display: flex; justify-content: space-between; gap: .4rem; }
.home-module-card > div b { color: var(--dashboard-ink); }
.home-module-finance { border-top: 4px solid var(--dashboard-green); }
.home-module-quiz { border-top: 4px solid #5386a3; }
.home-module-journal { border-top: 4px solid var(--dashboard-accent); }
.home-module-fitness { border-top: 4px solid #9c745e; }
.home-module-tracker { border-top: 4px solid #7868a6; }
.home-module-todo { border-top: 4px solid #d49a3a; }
.home-activity-panel { position: sticky; top: 1.25rem; }
.home-activity-list { position: relative; display: grid; }
.home-activity-list::before { position: absolute; top: 20px; bottom: 20px; left: 20px; width: 1px; content: ""; background: var(--dashboard-line); }
.home-activity-item { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: .75rem; padding: .65rem 0; color: var(--dashboard-ink); text-decoration: none; }
.home-activity-icon { z-index: 1; display: grid; width: 40px; height: 40px; place-items: center; color: var(--dashboard-accent-dark); background: #fff; border: 1px solid var(--dashboard-line); border-radius: 12px; }
.home-activity-item strong, .home-activity-item small, .home-activity-item time { display: block; }
.home-activity-item strong { overflow: hidden; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.home-activity-item small { display: -webkit-box; margin-top: .18rem; overflow: hidden; color: var(--dashboard-muted); font-size: .66rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.home-activity-item time { margin-top: .3rem; color: rgba(24,33,38,.45); font-size: .6rem; }
.home-activity-empty { padding: 2rem .5rem; color: var(--dashboard-muted); text-align: center; }
.home-activity-empty i { color: var(--dashboard-accent); font-size: 1.5rem; }
.home-activity-empty p { margin: .7rem 0 0; font-size: .75rem; line-height: 1.55; }

@media (max-width: 1150px) {
  .home-dashboard-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  .home-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 850px) {
  .home-dashboard-grid { grid-template-columns: 1fr; }
  .home-activity-panel { position: static; }
}

@media (max-width: 580px) {
  .home-hero { min-height: 0; }
  .home-date-mark { display: none; }
  .home-action-grid, .home-module-grid { grid-template-columns: 1fr; }
  .home-attention-item { grid-template-columns: 42px minmax(0, 1fr); }
  .home-attention-item b { grid-column: 2; }
}

/* Daily activity tracker */
.tracker-page { width: 100%; padding: 1rem 0 4rem; }
.tracker-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 1.4rem; }
.tracker-header h1 { margin: .7rem 0 .4rem; }
.tracker-header p { max-width: 750px; margin: 0; color: var(--dashboard-muted); }
.tracker-week-stat { display: grid; min-width: 150px; padding: 1rem 1.2rem; text-align: right; background: var(--dashboard-ink); border-radius: 18px; box-shadow: var(--dashboard-shadow); }
.tracker-week-stat strong { color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: 2.2rem; font-weight: 500; line-height: 1; }
.tracker-week-stat span { margin-top: .3rem; color: rgba(255,255,255,.6); font-size: .67rem; }
.tracker-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.2rem; align-items: start; }
.tracker-main, .tracker-aside { display: grid; gap: 1.2rem; }
.tracker-capture-panel, .tracker-day-panel, .tracker-calendar-panel, .tracker-philosophy { padding: clamp(1.25rem, 3vw, 1.8rem); background: var(--dashboard-paper); border: 1px solid rgba(255,255,255,.8); border-radius: var(--dashboard-radius); box-shadow: var(--dashboard-shadow); }
.tracker-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.15rem; }
.tracker-panel-heading span { display: block; margin-bottom: .2rem; color: var(--dashboard-accent-dark); font-size: .66rem; font-weight: 850; letter-spacing: .075em; text-transform: uppercase; }
.tracker-panel-heading h2 { margin: 0; font-size: 1.6rem; }
.tracker-panel-heading > i { display: grid; width: 42px; height: 42px; place-items: center; color: var(--dashboard-accent-dark); background: rgba(199,106,58,.1); border-radius: 13px; }
.tracker-form { display: grid; gap: 1rem; }
.tracker-field { display: block; margin: 0 !important; }
.tracker-field > span { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .42rem; color: var(--dashboard-muted); font-size: .68rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.tracker-field > span small { font-size: .57rem; font-weight: 650; letter-spacing: .02em; }
.tracker-field input, .tracker-field select, .tracker-field textarea { width: 100%; }
.tracker-field-name input { min-height: 56px; font-size: 1rem; }
.tracker-measure-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.tracker-form-actions { display: flex; justify-content: flex-end; gap: .6rem; }
.tracker-errors { padding: .85rem; color: var(--dashboard-red); background: rgba(167,70,70,.08); border-radius: 12px; font-size: .75rem; }
.tracker-errors strong { display: block; margin-bottom: .2rem; }
.tracker-day-panel { padding: 0; overflow: hidden; }
.tracker-day-header { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; align-items: center; gap: 1rem; padding: 1.2rem 1.4rem; text-align: center; background: rgba(24,33,38,.025); border-bottom: 1px solid var(--dashboard-line); }
.tracker-day-header > a { display: grid; width: 42px; height: 42px; place-items: center; color: var(--dashboard-muted); background: #fff; border: 1px solid var(--dashboard-line); border-radius: 12px; text-decoration: none; }
.tracker-day-header > a:hover { color: var(--dashboard-accent-dark); }
.tracker-day-header span { color: var(--dashboard-accent-dark); font-size: .67rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.tracker-day-header h2 { margin: .2rem 0 0; font-size: 1.45rem; }
.tracker-activity-list { display: grid; }
.tracker-activity-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; gap: .9rem; align-items: center; padding: 1rem 1.3rem; border-bottom: 1px solid var(--dashboard-line); }
.tracker-activity-item:last-child { border-bottom: 0; }
.tracker-activity-icon { display: grid; width: 48px; height: 48px; place-items: center; color: #7868a6; background: rgba(120,104,166,.1); border-radius: 14px; font-size: 1.05rem; }
.tracker-activity-item > div:nth-child(2) > span { color: var(--dashboard-muted); font-size: .61rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.tracker-activity-item h3 { margin: .15rem 0 0; font-size: .95rem; }
.tracker-activity-item p { margin: .25rem 0 0; color: var(--dashboard-muted); font-size: .72rem; }
.tracker-activity-item > strong { padding: .48rem .65rem; color: #66558f; background: rgba(120,104,166,.1); border-radius: 999px; font-size: .75rem; white-space: nowrap; }
.tracker-activity-actions { display: flex; gap: .3rem; }
.tracker-activity-actions a, .tracker-activity-actions button { display: grid; width: 32px; height: 32px; padding: 0; place-items: center; color: var(--dashboard-muted); background: rgba(24,33,38,.04); border: 0; border-radius: 9px; text-decoration: none; }
.tracker-activity-actions form { display: inline-flex; }
.tracker-activity-actions a:hover { color: var(--dashboard-accent-dark); }
.tracker-activity-actions button:hover { color: var(--dashboard-red); }
.tracker-empty { padding: clamp(2.5rem, 7vw, 5rem) 1.5rem; text-align: center; }
.tracker-empty > i { color: var(--dashboard-accent); font-size: 2rem; }
.tracker-empty h3 { margin: .8rem 0 .35rem; }
.tracker-empty p { margin: 0; color: var(--dashboard-muted); font-size: .8rem; }
.tracker-rhythm { display: grid; grid-template-columns: repeat(7, 1fr); gap: .4rem; }
.tracker-rhythm-day { display: grid; min-width: 0; padding: .5rem .15rem; place-items: center; color: var(--dashboard-muted); background: rgba(24,33,38,.035); border: 1px solid transparent; border-radius: 10px; text-decoration: none; }
.tracker-rhythm-day span { font-size: .52rem; font-weight: 800; text-transform: uppercase; }
.tracker-rhythm-day strong { margin: .12rem 0; color: var(--dashboard-ink); font-size: .75rem; }
.tracker-rhythm-day small { display: grid; width: 18px; height: 18px; place-items: center; color: rgba(24,33,38,.4); background: rgba(24,33,38,.06); border-radius: 50%; font-size: .52rem; }
.tracker-rhythm-day.has-activity { background: rgba(120,104,166,.1); }
.tracker-rhythm-day.has-activity small { color: #fff; background: #7868a6; }
.tracker-rhythm-day.is-today { border-color: var(--dashboard-accent); }
.tracker-philosophy { color: #fff; background: linear-gradient(135deg, #7868a6, #554779); border: 0; }
.tracker-philosophy > i { font-size: 1.35rem; }
.tracker-philosophy h2 { margin: .8rem 0 .4rem; color: #fff; font-size: 1.45rem; }
.tracker-philosophy p { margin: 0; color: rgba(255,255,255,.7); font-size: .75rem; line-height: 1.6; }
.tracker-edit-page { width: min(980px, 100%); margin: 0 auto; padding: 1.5rem 0 4rem; }
.tracker-edit-page header { margin-bottom: 1.4rem; }
.tracker-edit-page header h1 { margin: .65rem 0 .35rem; }
.tracker-edit-page header p { color: var(--dashboard-muted); }
.tracker-library-page, .tracker-detail-page, .alcohol-page { width: 100%; padding: 1rem 0 4rem; }
.tracker-library-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 1.4rem; }
.tracker-library-header h1 { margin: .7rem 0 .4rem; }
.tracker-library-header p { max-width: 720px; margin: 0; color: var(--dashboard-muted); }
.tracker-library-header .btn { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .45rem; }
.tracker-today-strip { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 1rem; margin-bottom: 1.2rem; padding: 1.15rem; color: #fff; background: var(--dashboard-ink); border-radius: 20px; box-shadow: var(--dashboard-shadow); }
.tracker-today-strip > div:first-child { display: grid; padding-right: 1rem; align-content: center; border-right: 1px solid rgba(255,255,255,.12); }
.tracker-today-strip > div:first-child span { color: rgba(255,255,255,.6); font-size: .65rem; font-weight: 800; text-transform: uppercase; }
.tracker-today-strip > div:first-child strong { font-family: Georgia, "Times New Roman", serif; font-size: 2.5rem; font-weight: 500; line-height: 1; }
.tracker-today-strip > div:first-child small { color: rgba(255,255,255,.55); font-size: .67rem; }
.tracker-today-items { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.tracker-today-items > a { display: flex; align-items: center; gap: .5rem; padding: .55rem .7rem; color: #fff; background: rgba(255,255,255,.07); border-radius: 12px; text-decoration: none; }
.tracker-today-items > a > i { color: var(--tracker-color); }
.tracker-today-items strong, .tracker-today-items small { display: block; }
.tracker-today-items strong { font-size: .72rem; }
.tracker-today-items small { color: rgba(255,255,255,.55); font-size: .6rem; }
.tracker-today-items > p { margin: 0; color: rgba(255,255,255,.55); font-size: .75rem; }
.tracker-library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.tracker-library-card { display: flex; min-height: 255px; flex-direction: column; padding: 1.3rem; color: var(--dashboard-ink); background: var(--dashboard-paper); border: 1px solid rgba(255,255,255,.82); border-top: 5px solid var(--tracker-color); border-radius: 20px; box-shadow: 0 12px 32px rgba(37,47,52,.08); text-decoration: none; }
.tracker-library-card:hover { color: var(--dashboard-ink); box-shadow: 0 17px 38px rgba(37,47,52,.13); transform: translateY(-2px); }
.tracker-library-card header { display: flex; align-items: center; justify-content: space-between; }
.tracker-library-card header span { display: grid; width: 46px; height: 46px; place-items: center; color: var(--tracker-color); background: color-mix(in srgb, var(--tracker-color) 12%, transparent); border-radius: 14px; }
.tracker-library-card header > i { color: var(--dashboard-muted); }
.tracker-library-card h2 { margin: 1.1rem 0 .4rem; font-size: 1.6rem; }
.tracker-library-card > p { flex: 1; color: var(--dashboard-muted); font-size: .76rem; line-height: 1.55; }
.tracker-library-card footer { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding-top: .9rem; color: var(--dashboard-muted); border-top: 1px solid var(--dashboard-line); font-size: .66rem; }
.tracker-library-card footer strong { color: var(--dashboard-ink); }
.tracker-alcohol-card { --tracker-color: #a65353; }
.trackable-form { display: grid; gap: 1rem; }
.trackable-form > label, .trackable-form-grid label, .tracker-log-form label, .alcohol-session-form label, .alcohol-drink-form label { display: block; margin: 0 !important; }
.trackable-form label > span, .tracker-log-form label > span, .alcohol-session-form label > span, .alcohol-drink-form label > span { display: flex; justify-content: space-between; margin-bottom: .42rem; color: var(--dashboard-muted); font-size: .67rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.trackable-form input, .trackable-form textarea, .trackable-form select, .tracker-log-form input, .alcohol-session-form input, .alcohol-drink-form input { width: 100%; }
.trackable-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.trackable-form input[type="color"] { min-height: 46px; padding: .35rem; }
.tracker-detail-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.tracker-detail-nav a { display: inline-flex; align-items: center; gap: .4rem; color: var(--dashboard-muted); font-size: .75rem; font-weight: 800; text-decoration: none; }
.tracker-detail-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 1.2rem; padding: clamp(1.5rem, 4vw, 2.8rem); color: #fff; background: linear-gradient(125deg, color-mix(in srgb, var(--tracker-color) 75%, #182126), #182126); border-radius: 26px; box-shadow: var(--dashboard-shadow); }
.tracker-detail-header > div:first-child > span { font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.tracker-detail-header h1 { margin: .7rem 0 .35rem; color: #fff; }
.tracker-detail-header p { max-width: 720px; margin: 0; color: rgba(255,255,255,.65); }
.tracker-detail-total { display: grid; min-width: 115px; text-align: right; }
.tracker-detail-total strong { font-family: Georgia, "Times New Roman", serif; font-size: 2.7rem; font-weight: 500; line-height: 1; }
.tracker-detail-total span { color: rgba(255,255,255,.6); font-size: .65rem; }
.tracker-log-panel, .tracker-analytics-panel, .tracker-history-panel, .tracker-insight-card, .alcohol-capture { padding: 1.25rem; background: var(--dashboard-paper); border: 1px solid rgba(255,255,255,.8); border-radius: var(--dashboard-radius); box-shadow: var(--dashboard-shadow); }
.tracker-log-panel { margin-bottom: 1.2rem; }
.tracker-log-form { display: grid; grid-template-columns: repeat(2, minmax(130px, .6fr)) minmax(150px, .7fr) minmax(240px, 1.4fr) auto; gap: .7rem; align-items: end; }
.tracker-log-note { min-width: 0; }
.tracker-log-form .btn { min-height: 46px; }
.tracker-amount-input, .alcohol-drink-form label > div { display: flex; align-items: center; overflow: hidden; background: #fff; border: 1px solid var(--dashboard-line); border-radius: 14px; }
.tracker-amount-input input, .alcohol-drink-form label > div input { border: 0; border-radius: 0; }
.tracker-amount-input b, .alcohol-drink-form label > div b { padding: 0 .75rem; color: var(--dashboard-muted); font-size: .7rem; white-space: nowrap; }
.tracker-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 1.2rem; align-items: start; }
.tracker-detail-layout > main, .tracker-detail-layout > aside { display: grid; gap: 1.2rem; }
.tracker-analytics-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.tracker-analytics-toolbar > span { color: var(--dashboard-muted); font-size: .68rem; }
.tracker-period-tabs { display: inline-flex; padding: .25rem; background: rgba(24,33,38,.045); border-radius: 11px; }
.tracker-period-tabs a { padding: .45rem .7rem; color: var(--dashboard-muted); border-radius: 8px; font-size: .68rem; font-weight: 800; text-decoration: none; }
.tracker-period-tabs a.is-active { color: #fff; background: var(--tracker-color); }
.tracker-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 1.1rem; overflow: hidden; background: rgba(24,33,38,.03); border: 1px solid var(--dashboard-line); border-radius: 15px; }
.tracker-stat-grid article { padding: 1rem; border-right: 1px solid var(--dashboard-line); }
.tracker-stat-grid article:last-child { border: 0; }
.tracker-stat-grid span, .tracker-insight-card > span { color: var(--dashboard-muted); font-size: .62rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.tracker-stat-grid strong { display: block; margin-top: .25rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.5rem; font-weight: 500; }
.tracker-chart { display: flex; height: 230px; gap: clamp(2px, .5vw, 8px); align-items: flex-end; overflow-x: auto; padding: 1.5rem .5rem 1.8rem; border-bottom: 1px solid var(--dashboard-line); }
.tracker-chart > div { position: relative; display: flex; min-width: 7px; height: 100%; flex: 1 0 7px; align-items: flex-end; }
.tracker-chart > div > span { display: block; width: 100%; min-height: 3px; background: linear-gradient(180deg, var(--tracker-color), color-mix(in srgb, var(--tracker-color) 60%, #182126)); border-radius: 5px 5px 2px 2px; }
.tracker-chart small { position: absolute; top: calc(100% + .35rem); left: 50%; color: var(--dashboard-muted); font-size: .52rem; transform: translateX(-50%); }
.tracker-history-list article { display: grid; grid-template-columns: 125px minmax(0, 1fr) auto; gap: .8rem; padding: .85rem 0; border-bottom: 1px solid var(--dashboard-line); }
.tracker-history-list article:last-child { border: 0; }
.tracker-history-list time { color: var(--dashboard-muted); font-size: .68rem; }
.tracker-history-list strong { font-size: .82rem; }
.tracker-history-list div > span { margin-left: .45rem; color: var(--tracker-color); font-size: .65rem; font-weight: 800; }
.tracker-history-list p { margin: .2rem 0 0; color: var(--dashboard-muted); font-size: .7rem; }
.tracker-history-list article > span { display: flex; gap: .3rem; }
.tracker-history-list article > span a, .tracker-history-list article > span button { display: grid; width: 30px; height: 30px; padding: 0; place-items: center; color: var(--dashboard-muted); background: rgba(24,33,38,.04); border: 0; border-radius: 8px; }
.tracker-insight-card { display: grid; }
.tracker-insight-card strong { margin-top: .35rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.55rem; font-weight: 500; }
.tracker-insight-card small { color: var(--dashboard-muted); }
.alcohol-header, .alcohol-session-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 1.2rem; }
.alcohol-header h1, .alcohol-session-header h1 { margin: .7rem 0 .35rem; }
.alcohol-header p, .alcohol-session-header p { max-width: 700px; margin: 0; color: var(--dashboard-muted); }
.alcohol-header > div:last-child { display: grid; min-width: 140px; padding: 1rem; color: #fff; text-align: right; background: #753f3f; border-radius: 18px; }
.alcohol-header > div:last-child strong { font-family: Georgia, "Times New Roman", serif; font-size: 2.3rem; font-weight: 500; }
.alcohol-header > div:last-child span { color: rgba(255,255,255,.6); font-size: .65rem; }
.alcohol-session-form { display: grid; grid-template-columns: .7fr 1fr 1fr 1.4fr auto; gap: .7rem; align-items: end; }
.alcohol-session-form .btn { min-height: 46px; }
.alcohol-session-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.alcohol-session-card { padding: 1.2rem; color: var(--dashboard-ink); background: var(--dashboard-paper); border: 1px solid rgba(255,255,255,.8); border-top: 4px solid #a65353; border-radius: 18px; box-shadow: var(--dashboard-shadow); text-decoration: none; }
.alcohol-session-card time { color: #a65353; font-size: .65rem; font-weight: 800; text-transform: uppercase; }
.alcohol-session-card h2 { margin: .55rem 0 .3rem; font-size: 1.35rem; }
.alcohol-session-card > p { color: var(--dashboard-muted); font-size: .72rem; }
.alcohol-session-card > div { display: flex; gap: .7rem; padding-top: .8rem; border-top: 1px solid var(--dashboard-line); }
.alcohol-session-card > div span { color: var(--dashboard-muted); font-size: .61rem; }
.alcohol-session-card > div strong { display: block; color: var(--dashboard-ink); font-size: .8rem; }
.alcohol-session-header > div:last-child { display: grid; grid-template-columns: repeat(2, 1fr); overflow: hidden; background: #753f3f; border-radius: 18px; }
.alcohol-session-header article { padding: 1rem; color: #fff; }
.alcohol-session-header article + article { border-left: 1px solid rgba(255,255,255,.12); }
.alcohol-session-header article span { display: block; color: rgba(255,255,255,.6); font-size: .62rem; text-transform: uppercase; }
.alcohol-session-header article strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; font-weight: 500; }
.alcohol-drink-form { display: grid; grid-template-columns: 1fr 1fr .55fr .8fr .8fr 1fr auto; gap: .65rem; align-items: end; }
.alcohol-drink-form .btn { min-height: 46px; }
.alcohol-drink-list { display: grid; gap: .65rem; margin-top: 1rem; }
.alcohol-drink-list article { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: .75rem; align-items: center; padding: 1rem; background: var(--dashboard-paper); border: 1px solid var(--dashboard-line); border-radius: 15px; }
.alcohol-drink-list article > span { display: grid; width: 44px; height: 44px; place-items: center; color: #a65353; background: rgba(166,83,83,.1); border-radius: 12px; }
.alcohol-drink-list h2 { margin: 0; font-size: .92rem; }
.alcohol-drink-list p { margin: .2rem 0 0; color: var(--dashboard-muted); font-size: .68rem; }
.alcohol-drink-list > article > strong { font-size: .75rem; }
.alcohol-drink-list button { display: grid; width: 32px; height: 32px; padding: 0; place-items: center; color: var(--dashboard-red); background: rgba(167,70,70,.08); border: 0; border-radius: 9px; }

@media (max-width: 1100px) {
  .tracker-library-grid, .alcohol-session-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tracker-log-form, .alcohol-session-form, .alcohol-drink-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .tracker-library-header, .tracker-detail-header, .alcohol-header, .alcohol-session-header { align-items: stretch; flex-direction: column; }
  .tracker-today-strip, .tracker-detail-layout { grid-template-columns: 1fr; }
  .tracker-today-strip > div:first-child { padding: 0 0 .8rem; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .tracker-detail-total { text-align: left; }
  .tracker-analytics-toolbar { align-items: stretch; flex-direction: column; }
}

@media (max-width: 540px) {
  .tracker-library-grid, .alcohol-session-grid, .trackable-form-grid, .tracker-log-form, .alcohol-session-form, .alcohol-drink-form { grid-template-columns: 1fr; }
  .tracker-stat-grid { grid-template-columns: 1fr; }
  .tracker-stat-grid article { border-right: 0; border-bottom: 1px solid var(--dashboard-line); }
  .tracker-history-list article { grid-template-columns: 1fr auto; }
  .tracker-history-list time { grid-column: 1 / -1; }
}

/* Todo workspace */
.todo-page, .todo-list-page { width: 100%; padding: 1rem 0 4rem; }
.todo-header-actions { display: flex; gap: .6rem; align-items: center; }
.todo-nav-delete { display: inline-flex; align-items: center; gap: .35rem; padding: 0; color: var(--dashboard-red); background: transparent; border: 0; font: inherit; }
.todo-archive-hint { margin: -.25rem 0 1rem; padding: .7rem .85rem; color: var(--dashboard-muted); background: rgba(24,33,38,.035); border-radius: 11px; font-size: .72rem; }
.todo-danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--dashboard-line); }
.todo-danger-zone strong, .todo-danger-zone p { display: block; }
.todo-danger-zone p { margin: .2rem 0 0; color: var(--dashboard-muted); font-size: .72rem; }
.todo-archive-count { padding: .55rem .8rem; color: var(--dashboard-muted); background: rgba(255,255,255,.55); border-radius: 999px; font-size: .72rem; }
.todo-archive-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.todo-archive-grid article { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 1.2rem; background: var(--dashboard-paper); border: 1px solid rgba(255,255,255,.8); border-top: 4px solid var(--list-color); border-radius: 18px; box-shadow: var(--dashboard-shadow); }
.todo-archive-mark { display: grid; width: 48px; height: 48px; place-items: center; color: #fff; background: var(--list-color); border-radius: 15px; font-size: 1.25rem; }
.todo-archive-grid article > div > span { color: var(--dashboard-accent-dark); font-size: .62rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.todo-archive-grid h2 { margin: .2rem 0; font-size: 1.3rem; }
.todo-archive-grid p { margin: 0 0 .5rem; color: var(--dashboard-muted); font-size: .72rem; }
.todo-archive-grid small { color: var(--dashboard-muted); font-size: .66rem; }
.todo-archive-actions { display: flex; align-items: center; gap: .4rem; }
.todo-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 1.3rem; }
.todo-header h1 { margin: .7rem 0 .4rem; }
.todo-header p { max-width: 720px; margin: 0; color: var(--dashboard-muted); }
.todo-header .btn { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .45rem; }
.todo-overview { display: grid; grid-template-columns: repeat(5, 1fr); gap: .7rem; margin-bottom: 1.15rem; }
.todo-overview > a { display: grid; padding: .9rem 1rem; color: var(--dashboard-muted); background: var(--dashboard-paper); border: 1px solid rgba(255,255,255,.8); border-radius: 16px; box-shadow: 0 8px 24px rgba(37,47,52,.06); text-decoration: none; }
.todo-overview > a:hover, .todo-overview > a.is-active { color: var(--dashboard-ink); border-color: rgba(199,106,58,.25); box-shadow: 0 12px 28px rgba(37,47,52,.1); }
.todo-overview > a.is-active { background: rgba(199,106,58,.08); }
.todo-overview span { font-size: .65rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.todo-overview strong { margin: .15rem 0; color: var(--dashboard-ink); font-family: Georgia, "Times New Roman", serif; font-size: 1.7rem; font-weight: 500; line-height: 1; }
.todo-overview small { font-size: .62rem; }
.todo-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 1.1rem; align-items: start; }
.todo-lists-panel, .todo-focus-panel, .todo-capture-panel, .todo-list-tasks, .todo-edit-page > section { padding: 1.25rem; background: var(--dashboard-paper); border: 1px solid rgba(255,255,255,.8); border-radius: var(--dashboard-radius); box-shadow: var(--dashboard-shadow); }
.todo-lists-panel { position: sticky; top: 1.2rem; }
.todo-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.todo-panel-heading span { display: block; margin-bottom: .2rem; color: var(--dashboard-accent-dark); font-size: .64rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.todo-panel-heading h2 { margin: 0; font-size: 1.45rem; }
.todo-panel-heading > a, .todo-panel-heading > i { display: grid; width: 38px; height: 38px; place-items: center; color: var(--dashboard-accent-dark); background: rgba(199,106,58,.1); border-radius: 11px; text-decoration: none; }
.todo-panel-heading > small { color: var(--dashboard-muted); font-size: .7rem; }
.todo-list-nav { display: grid; gap: .4rem; }
.todo-list-nav > a { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: .7rem; align-items: center; padding: .72rem; color: var(--dashboard-ink); background: rgba(24,33,38,.025); border: 1px solid transparent; border-radius: 12px; text-decoration: none; }
.todo-list-nav > a:hover { background: rgba(24,33,38,.05); border-color: var(--dashboard-line); }
.todo-list-nav > a > span { width: 10px; height: 38px; background: var(--list-color); border-radius: 999px; }
.todo-list-nav strong, .todo-list-nav small { display: block; }
.todo-list-nav strong { font-size: .76rem; }
.todo-list-nav small { margin-top: .15rem; color: var(--dashboard-muted); font-size: .61rem; }
.todo-list-nav > a > i { color: var(--dashboard-muted); font-size: .7rem; }
.todo-list-nav > p { color: var(--dashboard-muted); font-size: .72rem; }
.todo-task-list { display: grid; gap: .55rem; }
.todo-task { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto; gap: .8rem; align-items: center; padding: .85rem; background: rgba(24,33,38,.022); border: 1px solid var(--dashboard-line); border-radius: 14px; }
.todo-task.is-overdue { background: rgba(167,70,70,.035); border-color: rgba(167,70,70,.16); }
.todo-task.is-complete { opacity: .62; }
.todo-task.is-complete h3 { text-decoration: line-through; }
.todo-task-check { display: grid; width: 38px; height: 38px; padding: 0; place-items: center; color: transparent; background: #fff; border: 2px solid rgba(24,33,38,.18); border-radius: 12px; }
.todo-task.is-complete .todo-task-check { color: #fff; background: var(--dashboard-green); border-color: var(--dashboard-green); }
.todo-task-copy > div:first-child { display: flex; align-items: center; gap: .4rem; color: var(--dashboard-muted); font-size: .6rem; }
.todo-task-list-dot { display: inline-block; width: 7px; height: 7px; margin-left: .2rem; background: var(--list-color); border-radius: 50%; }
.todo-task-copy h3 { margin: .2rem 0 0; font-size: .88rem; }
.todo-task-copy p { margin: .25rem 0 0; color: var(--dashboard-muted); font-size: .68rem; }
.todo-priority { padding: .25rem .4rem; border-radius: 999px; font-size: .55rem; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; }
.todo-priority-low { color: var(--dashboard-muted); background: rgba(24,33,38,.06); }
.todo-priority-normal { color: #5386a3; background: rgba(83,134,163,.1); }
.todo-priority-high { color: var(--dashboard-accent-dark); background: rgba(199,106,58,.1); }
.todo-priority-urgent { color: var(--dashboard-red); background: rgba(167,70,70,.1); }
.todo-task > time { display: inline-flex; align-items: center; gap: .35rem; color: var(--dashboard-muted); font-size: .66rem; white-space: nowrap; }
.todo-task > time.is-overdue { color: var(--dashboard-red); font-weight: 800; }
.todo-task-actions { display: flex; gap: .3rem; }
.todo-task-actions a, .todo-task-actions button { display: grid; width: 31px; height: 31px; padding: 0; place-items: center; color: var(--dashboard-muted); background: rgba(24,33,38,.045); border: 0; border-radius: 8px; text-decoration: none; }
.todo-task-actions form { display: inline-flex; }
.todo-task-actions button:hover { color: var(--dashboard-red); }
.todo-empty { padding: clamp(2.5rem, 7vw, 5rem) 1rem; color: var(--dashboard-muted); text-align: center; }
.todo-empty > i { color: var(--dashboard-green); font-size: 2rem; }
.todo-empty h3 { margin: .7rem 0 .3rem; color: var(--dashboard-ink); }
.todo-empty p { max-width: 460px; margin: 0 auto; font-size: .75rem; }
.todo-list-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 1.1rem; padding: clamp(1.5rem, 4vw, 2.7rem); color: #fff; background: linear-gradient(125deg, color-mix(in srgb, var(--list-color) 75%, #182126), #182126); border-radius: 26px; box-shadow: var(--dashboard-shadow); }
.todo-list-header > div:first-child > span { font-size: .67rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.todo-list-header h1 { margin: .6rem 0 .3rem; color: #fff; }
.todo-list-header p { max-width: 700px; margin: 0; color: rgba(255,255,255,.65); }
.todo-list-header > div:last-child { display: grid; text-align: right; }
.todo-list-header > div:last-child strong { font-family: Georgia, "Times New Roman", serif; font-size: 2.6rem; font-weight: 500; line-height: 1; }
.todo-list-header > div:last-child span { color: rgba(255,255,255,.6); font-size: .65rem; }
.todo-capture-panel { margin-bottom: 1.1rem; }
.todo-task-form { display: grid; grid-template-columns: minmax(240px, 1.5fr) minmax(145px, .65fr) minmax(140px, .55fr) minmax(220px, 1fr) auto; gap: .7rem; align-items: end; }
.todo-task-form label, .todo-list-form label { display: block; margin: 0 !important; }
.todo-task-form label > span, .todo-list-form label > span { display: flex; justify-content: space-between; margin-bottom: .42rem; color: var(--dashboard-muted); font-size: .66rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.todo-task-form input, .todo-task-form select, .todo-list-form input, .todo-list-form textarea { width: 100%; }
.todo-task-form .btn { min-height: 46px; }
.todo-edit-page { width: min(900px, 100%); margin: 0 auto; padding: 1.5rem 0 4rem; }
.todo-edit-page header { margin-bottom: 1.2rem; }
.todo-edit-page header h1 { margin: .65rem 0 .35rem; }
.todo-edit-page header p { color: var(--dashboard-muted); }
.todo-list-form { display: grid; gap: 1rem; }
.todo-list-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.todo-list-form input[type="color"] { min-height: 46px; padding: .35rem; }
.todo-form-actions { display: flex; justify-content: flex-end; gap: .6rem; }
.todo-errors { padding: .8rem; color: var(--dashboard-red); background: rgba(167,70,70,.08); border-radius: 12px; font-size: .72rem; }

@media (max-width: 1050px) {
  .todo-task-form { grid-template-columns: 1fr 1fr; }
  .todo-task-title, .todo-task-notes { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .todo-header, .todo-list-header { align-items: stretch; flex-direction: column; }
  .todo-overview { grid-template-columns: repeat(2, 1fr); }
  .todo-layout { grid-template-columns: 1fr; }
  .todo-lists-panel { position: static; }
  .todo-list-header > div:last-child { text-align: left; }
}

@media (max-width: 540px) {
  .todo-task-form, .todo-list-form-row { grid-template-columns: 1fr; }
  .todo-task-title, .todo-task-notes { grid-column: 1; }
  .todo-task { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .todo-task > time { grid-column: 2; }
  .todo-task-actions { grid-column: 3; grid-row: 1 / 3; }
}

@media (max-width: 1000px) {
  .tracker-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .tracker-measure-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .tracker-layout { grid-template-columns: 1fr; }
  .tracker-header { align-items: stretch; flex-direction: column; }
  .tracker-week-stat { text-align: left; }
}

@media (max-width: 520px) {
  .tracker-measure-grid { grid-template-columns: 1fr; }
  .tracker-activity-item { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .tracker-activity-item > strong { grid-column: 2; justify-self: start; }
  .tracker-activity-actions { grid-column: 3; grid-row: 1 / 3; }
}

@media (max-width: 1050px) {
  .journal-outline { margin-bottom: 1rem; }
  .journal-workspace { grid-template-columns: minmax(0, 1fr) 280px; }
  .journal-search-form { grid-template-columns: 1fr 1fr; }
  .journal-search-button { grid-column: 1 / -1; }
  .journal-archive-form { grid-template-columns: 1fr 1fr; }
  .journal-archive-search { grid-column: 1 / -1; }
  .journal-archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .journal-workspace { grid-template-columns: 1fr; }
  .journal-workspace-sidebar { grid-row: 2; grid-template-columns: 1fr; }
  .journal-entry-list { max-height: none; }
  .journal-archive-header { align-items: stretch; flex-direction: column; }
}

@media (max-width: 520px) {
  .journal-search-form { grid-template-columns: 1fr; }
  .journal-search-button { grid-column: 1; }
  .journal-entry-form trix-editor.form-control { min-height: 360px; }
  .journal-reading-page { padding-top: 1rem; }
  .journal-document { min-height: 0; padding: 1.5rem 1.15rem; border-radius: 4px; }
  .journal-document-header h1 { font-size: 2.35rem; }
  .journal-archive-form, .journal-archive-grid { grid-template-columns: 1fr; }
  .journal-archive-search { grid-column: 1; }
  .journal-clear-filters { width: 100%; margin: .35rem 0 0; }
}

@media (max-width: 600px) {
  .dashboard-shell {
    width: 100%;
  }

  h1 {
    font-size: 2.55rem;
  }

  .card-body,
  .entry-card,
  .search-form {
    padding: 1.1rem;
  }

  .source-library-header {
    align-items: stretch;
    flex-direction: column;
    gap: 1.1rem;
  }

  .source-library-add {
    justify-content: center;
  }

  .source-library-summary {
    max-width: none;
  }

  .source-summary-item {
    padding: 0.75rem;
  }

  .source-card {
    min-height: 330px;
  }

  .question-index-heading { align-items: stretch; flex-direction: column; }
  .question-study-header { align-items: flex-start; flex-direction: column; }
  .question-meta { justify-content: flex-start; }
  .question-study-toolbar { align-items: stretch; flex-direction: column; }
  .batch-delete-action { right: .85rem; bottom: .85rem; }
}

/* Daily expenses */
.expense-page { padding-bottom: 3rem; }
.expense-items-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.expense-items-heading h2 { margin-bottom: .25rem; }
.expense-line-items { display: grid; gap: .65rem; margin-top: 1rem; }
.expense-line-item { display: grid; grid-template-columns: minmax(180px, 2fr) minmax(80px, .55fr) minmax(90px, .7fr) minmax(110px, .9fr) 85px 36px; gap: .55rem; align-items: end; padding: .75rem; background: rgba(24,33,38,.025); border: 1px solid var(--dashboard-line); border-radius: 15px; }
.expense-line-item .finance-field { margin: 0; }
.expense-line-total { align-self: center; padding-top: 1.2rem; font-family: Georgia, "Times New Roman", serif; font-weight: 600; text-align: right; }
.expense-remove-item { display: grid; width: 34px; height: 34px; margin-bottom: .28rem; place-items: center; color: var(--dashboard-muted); background: transparent; border: 0; border-radius: 9px; }
.expense-remove-item:hover { color: var(--dashboard-red); background: rgba(167,70,70,.08); }
.expense-items-total { display: flex; align-items: baseline; justify-content: flex-end; gap: .75rem; margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--dashboard-line); }
.expense-items-total span { color: var(--dashboard-muted); font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.expense-items-total strong { min-width: 85px; font-family: Georgia, "Times New Roman", serif; font-size: 1.3rem; text-align: right; }
.expense-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 1.4rem; padding: clamp(.5rem, 2vw, 1.2rem) 0; }
.expense-header h1 { margin: .8rem 0 .55rem; }
.expense-header p { max-width: 650px; margin: 0; color: var(--dashboard-muted); font-size: 1.02rem; line-height: 1.65; }
.expense-add { display: inline-flex; align-items: center; gap: .45rem; flex: 0 0 auto; }
.expense-overview { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: .8rem; margin-bottom: 1.35rem; }
.expense-overview article { position: relative; overflow: hidden; padding: 1.15rem 1.25rem; background: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.78); border-radius: 18px; }
.expense-overview article::before { position: absolute; inset: 0 auto 0 0; width: 4px; content: ""; background: rgba(24,33,38,.18); }
.expense-overview .expense-overview-primary::before { background: var(--dashboard-accent); }
.expense-overview span, .expense-overview small { display: block; color: var(--dashboard-muted); }
.expense-overview span { font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.expense-overview strong { display: block; margin: .25rem 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.45rem, 2.5vw, 2rem); font-weight: 500; }
.expense-overview small { font-size: .72rem; }
.expense-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1.1rem; align-items: start; }
.expense-filters { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto auto auto; gap: .55rem; margin-bottom: 1.1rem; padding: .75rem; background: var(--dashboard-paper); border: 1px solid rgba(255,255,255,.8); border-radius: 18px; box-shadow: 0 12px 32px rgba(37,47,52,.07); }
.expense-filters input, .expense-filters select { width: 100%; min-height: 44px; }
.expense-search { position: relative; }
.expense-search i { position: absolute; top: 50%; left: .9rem; z-index: 1; color: var(--dashboard-muted); transform: translateY(-50%); }
.expense-search input { padding-left: 2.45rem; }
.expense-days { display: grid; gap: 1rem; }
.expense-day { overflow: hidden; background: var(--dashboard-paper); border: 1px solid rgba(255,255,255,.8); border-radius: 22px; box-shadow: var(--dashboard-shadow); }
.expense-day-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; background: rgba(24,33,38,.035); border-bottom: 1px solid var(--dashboard-line); }
.expense-day-header span { color: var(--dashboard-accent-dark); font-size: .67rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.expense-day-header h2 { margin: .15rem 0 0; font-family: inherit; font-size: 1rem; font-weight: 800; letter-spacing: -.01em; }
.expense-day-header > strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.25rem; font-weight: 500; }
.expense-list { padding: .25rem 1.1rem; }
.expense-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto auto auto; gap: .8rem; align-items: center; padding: .9rem .1rem; border-bottom: 1px solid var(--dashboard-line); }
.expense-row:last-child { border-bottom: 0; }
.expense-row-icon, .expense-category-icon { display: inline-grid; place-items: center; color: var(--dashboard-accent-dark); background: rgba(199,106,58,.1); border-radius: 12px; }
.expense-row-icon { width: 42px; height: 42px; font-size: 1.05rem; }
.expense-row-main { min-width: 0; }
.expense-row-main h3 { overflow: hidden; margin: 0 0 .2rem; font-size: .93rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.expense-row-main p { overflow: hidden; margin: 0; color: var(--dashboard-muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.expense-row-main .expense-item-preview { margin-top: .22rem; color: var(--dashboard-accent-dark); }
.expense-row-amount { font-family: Georgia, "Times New Roman", serif; font-size: 1.05rem; font-weight: 600; white-space: nowrap; }
.expense-receipt { color: var(--dashboard-muted); }
.expense-row-actions { display: flex; align-items: center; gap: .25rem; opacity: .4; transition: opacity 150ms ease; }
.expense-row:hover .expense-row-actions, .expense-row:focus-within .expense-row-actions { opacity: 1; }
.expense-row-actions form { display: inline-flex; }
.expense-row-actions a, .expense-row-actions button { display: inline-grid; width: 32px; height: 32px; padding: 0; place-items: center; color: var(--dashboard-muted); background: transparent; border: 0; border-radius: 9px; }
.expense-row-actions a:hover { color: var(--dashboard-ink); background: rgba(24,33,38,.07); }
.expense-row-actions button:hover { color: var(--dashboard-red); background: rgba(167,70,70,.08); }
.expense-insights { display: grid; gap: 1rem; }
.expense-insights > section { padding: 1.2rem; background: var(--dashboard-paper); border: 1px solid rgba(255,255,255,.8); border-radius: 22px; box-shadow: var(--dashboard-shadow); }
.expense-insights h2 { margin: .6rem 0 1rem; font-size: 1.5rem; }
.expense-category-list { display: grid; gap: .15rem; }
.expense-category-list > div { display: grid; grid-template-columns: 34px 1fr auto; gap: .55rem; align-items: center; padding: .65rem 0; border-bottom: 1px solid var(--dashboard-line); }
.expense-category-list > div:last-child { border: 0; }
.expense-category-icon { width: 34px; height: 34px; }
.expense-category-list span strong, .expense-category-list span small { display: block; }
.expense-category-list span strong { font-size: .75rem; }
.expense-category-list span small { color: var(--dashboard-muted); font-size: .62rem; }
.expense-category-list b { font-size: .75rem; white-space: nowrap; }
.expense-muted { color: var(--dashboard-muted); font-size: .8rem; }
.expense-ledger-link { display: grid; grid-template-columns: 38px 1fr auto; gap: .65rem; align-items: center; padding: 1rem; color: #fff; background: var(--dashboard-ink); border-radius: 18px; box-shadow: var(--dashboard-shadow); text-decoration: none; }
.expense-ledger-link > i:first-child { display: grid; width: 38px; height: 38px; place-items: center; background: rgba(255,255,255,.1); border-radius: 11px; }
.expense-ledger-link strong, .expense-ledger-link small { display: block; }
.expense-ledger-link strong { color: #fff; font-size: .78rem; }
.expense-ledger-link small { color: rgba(255,255,255,.6); font-size: .66rem; }
.expense-ledger-link:hover { color: #fff; background: #222d33; }
.expense-empty { padding: 4rem 1.5rem; text-align: center; background: var(--dashboard-paper); border-radius: 22px; box-shadow: var(--dashboard-shadow); }
.expense-empty > div { display: grid; width: 62px; height: 62px; margin: 0 auto; place-items: center; color: var(--dashboard-accent-dark); background: rgba(199,106,58,.1); border-radius: 20px; font-size: 1.5rem; }
.expense-empty h2 { margin: 1rem 0 .4rem; }
.expense-empty p { color: var(--dashboard-muted); }

@media (max-width: 1050px) {
  .expense-layout { grid-template-columns: 1fr; }
  .expense-insights { grid-template-columns: 1fr 1fr; }
  .expense-filters { grid-template-columns: 1fr 1fr 1fr; }
  .expense-search { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .expense-header { align-items: stretch; flex-direction: column; gap: 1rem; }
  .expense-add { justify-content: center; }
  .expense-overview { grid-template-columns: 1fr 1fr; }
  .expense-overview-primary { grid-column: 1 / -1; }
  .expense-filters, .expense-insights { grid-template-columns: 1fr; }
  .expense-filters > * { grid-column: 1; }
  .expense-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .expense-row-amount { grid-column: 2; }
  .expense-receipt { grid-row: 1; grid-column: 3; }
  .expense-row-actions { grid-row: 2; grid-column: 3; opacity: 1; }
}

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

/* Specialised health tracker */
.health-page, .health-edit-page { padding-bottom: 3rem; }
.health-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin: .5rem 0 1.25rem; }
.health-header h1, .health-edit-page h1 { margin: .7rem 0 .55rem; font-size: clamp(2.6rem, 6vw, 4.8rem); }
.health-header p { max-width: 720px; margin: 0; color: var(--dashboard-muted); font-size: 1.02rem; line-height: 1.65; }
.health-header-mark { display: grid; min-width: 125px; padding: 1rem; place-items: center; color: var(--dashboard-green); background: rgba(36,115,91,.09); border: 1px solid rgba(36,115,91,.12); border-radius: 18px; font-size: .68rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.health-header-mark i { margin-bottom: .3rem; font-size: 1.6rem; }
.health-notice { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: 1rem; padding: .85rem 1rem; color: #5f654f; background: rgba(207,181,99,.13); border: 1px solid rgba(157,132,54,.14); border-radius: 14px; }
.health-notice p { margin: 0; font-size: .78rem; line-height: 1.55; }
.health-periods { display: flex; align-items: center; gap: .35rem; margin-bottom: 1rem; padding: .45rem; background: rgba(255,255,255,.45); border: 1px solid rgba(255,255,255,.72); border-radius: 15px; }
.health-periods a { padding: .6rem .85rem; color: var(--dashboard-muted); border-radius: 10px; font-size: .73rem; font-weight: 800; text-decoration: none; }
.health-periods a:hover, .health-periods a.is-active { color: #fff; background: var(--dashboard-ink); }
.health-periods > span { margin-left: auto; padding-right: .6rem; color: var(--dashboard-muted); font-size: .72rem; }
.health-capture-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.health-capture-card, .health-dashboard-card, .health-edit-page > section { padding: clamp(1.15rem, 3vw, 1.6rem); background: var(--dashboard-paper); border: 1px solid rgba(255,255,255,.8); border-radius: var(--dashboard-radius); box-shadow: var(--dashboard-shadow); }
.health-capture-card { border-top: 5px solid #b65353; }
.health-capture-card.health-glucose { border-top-color: #5386a3; }
.health-capture-card.health-weight { border-top-color: #7868a6; }
.health-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.health-form label { margin: 0; }
.health-form label > span { display: flex; justify-content: space-between; margin-bottom: .35rem; color: var(--dashboard-muted); font-size: .65rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.health-form label > span small { font-weight: 650; letter-spacing: 0; text-transform: none; }
.health-form input, .health-form select, .health-form textarea { width: 100%; }
.health-field-wide { grid-column: 1 / -1; }
.health-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; }
.health-form-actions > a { color: var(--dashboard-muted); font-size: .78rem; font-weight: 750; }
.health-dashboard-card { margin-bottom: 1rem; }
.health-card-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.health-card-heading > div > span { color: #a74646; font-size: .65rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.health-glucose .health-card-heading > div > span { color: #3e718e; }
.health-card-heading h2 { margin: .25rem 0 0; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.health-card-heading > small { color: var(--dashboard-muted); font-size: .7rem; }
.health-results-toggle { width: 100%; margin: 0; padding: 0; color: inherit; background: transparent; border: 0; text-align: left; }
.health-results-heading-end { display: flex; align-items: center; gap: 1rem; }
.health-results-heading-end > small { color: var(--dashboard-muted); font-size: .7rem; }
.health-results-chevron { display: grid; width: 42px; height: 42px; place-items: center; color: var(--dashboard-accent-dark); background: rgba(199,106,58,.08); border-radius: 12px; transition: transform 180ms ease; }
.health-results-toggle[aria-expanded='true'] .health-results-chevron { transform: rotate(180deg); }
.health-results-content { padding-top: 1.1rem; }
.health-legend { display: flex; gap: 1rem; color: var(--dashboard-muted); font-size: .7rem; font-weight: 750; }
.health-legend span { display: flex; align-items: center; gap: .35rem; }
.health-legend i { width: 18px; height: 3px; background: #b65353; border-radius: 99px; }
.health-legend span:last-child i { background: #d09a77; }
.health-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; margin-bottom: 1rem; }
.health-stat-grid article { padding: .85rem 1rem; background: rgba(24,33,38,.035); border: 1px solid rgba(24,33,38,.045); border-radius: 14px; }
.health-stat-grid span, .health-stat-grid small { display: block; color: var(--dashboard-muted); }
.health-stat-grid span { font-size: .63rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.health-stat-grid strong { display: inline-block; margin: .2rem .25rem 0 0; color: var(--dashboard-ink); font-family: Georgia, "Times New Roman", serif; font-size: 1.7rem; font-weight: 500; }
.health-stat-grid small { display: inline; font-size: .65rem; }
.health-line-chart { position: relative; height: 210px; margin-bottom: 1.25rem; padding: .6rem .6rem 1.2rem 2.7rem; background: linear-gradient(rgba(24,33,38,.04) 1px, transparent 1px); background-size: 100% 33.33%; border: 1px solid var(--dashboard-line); border-radius: 16px; }
.health-line-chart svg { width: 100%; height: 100%; overflow: visible; }
.health-line-chart line { stroke: rgba(24,33,38,.1); stroke-width: .4; stroke-dasharray: 2; vector-effect: non-scaling-stroke; }
.health-line-chart polyline { fill: none; stroke: #b65353; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.health-line-chart .health-line-secondary { stroke: #d09a77; }
.health-glucose .health-line-chart .health-line-primary { stroke: #5386a3; }
.health-weight .health-card-heading > div > span { color: #65558f; }
.health-weight .health-line-chart .health-line-primary { stroke: #7868a6; }
.health-chart-scale { position: absolute; inset: .55rem auto 1.1rem .55rem; display: flex; flex-direction: column; justify-content: space-between; color: var(--dashboard-muted); font-size: .58rem; }
.health-history { border-top: 1px solid var(--dashboard-line); }
.health-history article { display: grid; grid-template-columns: 100px minmax(0, 1fr) auto; gap: 1rem; padding: .9rem .25rem; border-bottom: 1px solid var(--dashboard-line); }
.health-history time span, .health-history article > div > span, .health-history p { display: block; color: var(--dashboard-muted); font-size: .7rem; }
.health-history time strong { display: block; font-size: .78rem; }
.health-history article > div > strong { font-size: 1.05rem; }
.health-history article > div > strong small { color: var(--dashboard-muted); font-size: .65rem; }
.health-history p { margin: .25rem 0 0; }
.health-history article > span { display: flex; gap: .25rem; }
.health-history article > span a, .health-history article > span button { display: grid; width: 34px; height: 34px; padding: 0; place-items: center; color: var(--dashboard-muted); background: rgba(24,33,38,.04); border: 0; border-radius: 9px; }
.health-history article > span form { display: inline; }
.health-empty { padding: 2rem; color: var(--dashboard-muted); text-align: center; }
.health-edit-page { width: min(850px, 100%); margin: 0 auto; }
.health-back-link { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: 1rem; font-weight: 800; text-decoration: none; }
.tracker-health-card header > span { color: #fff; background: #b65353; }
.home-module-health { --module-color: #b65353; }
.health-overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.health-overview-card { display: flex; min-height: 300px; flex-direction: column; padding: 1.4rem; color: var(--dashboard-ink); background: var(--dashboard-paper); border: 1px solid rgba(255,255,255,.8); border-top: 5px solid #b65353; border-radius: var(--dashboard-radius); box-shadow: var(--dashboard-shadow); text-decoration: none; transition: transform 160ms ease, box-shadow 160ms ease; }
.health-overview-card.health-glucose { border-top-color: #5386a3; }
.health-overview-card.health-weight { border-top-color: #7868a6; }
.health-overview-card:hover { color: var(--dashboard-ink); transform: translateY(-3px); box-shadow: 0 18px 42px rgba(37,47,52,.15); }
.health-overview-card header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.4rem; }
.health-overview-card header span { display: grid; width: 46px; height: 46px; place-items: center; color: #a74646; background: rgba(167,70,70,.09); border-radius: 14px; font-size: 1.2rem; }
.health-overview-card.health-glucose header span { color: #3e718e; background: rgba(83,134,163,.1); }
.health-overview-card.health-weight header span { color: #65558f; background: rgba(120,104,166,.1); }
.health-overview-card > small { color: var(--dashboard-muted); font-size: .67rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.health-overview-card > strong { margin: .4rem 0 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 500; line-height: 1; }
.health-overview-card > p { color: var(--dashboard-muted); font-size: .78rem; }
.health-overview-card footer { display: flex; justify-content: space-between; gap: 1rem; margin-top: auto; padding-top: 1rem; color: var(--dashboard-muted); border-top: 1px solid var(--dashboard-line); font-size: .7rem; }
.health-overview-card footer b { color: var(--dashboard-ink); }
.health-category-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 1rem; }
.health-category-header h1 { margin: .7rem 0 .45rem; font-size: clamp(2.7rem, 6vw, 4.8rem); }
.health-category-header p { max-width: 720px; margin: 0; color: var(--dashboard-muted); line-height: 1.6; }
.health-category-count { display: grid; min-width: 130px; padding: 1rem; place-items: center; background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.8); border-radius: 18px; }
.health-category-count strong { font-family: Georgia, "Times New Roman", serif; font-size: 2rem; font-weight: 500; }
.health-category-count small { color: var(--dashboard-muted); font-size: .68rem; }
.health-category-capture { margin-bottom: 1rem; padding: 1.3rem; background: var(--dashboard-paper); border: 1px solid rgba(255,255,255,.8); border-radius: var(--dashboard-radius); box-shadow: var(--dashboard-shadow); }
.health-category-capture .health-form { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.health-category-capture .health-form .health-field-wide { grid-column: span 2; }
.health-category-capture .health-form-actions { grid-column: 1 / -1; }
.health-filter-panel { margin-bottom: 1rem; padding: 1rem; background: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.8); border-radius: 20px; box-shadow: 0 12px 32px rgba(37,47,52,.07); }
.health-filter-panel .health-periods { margin-bottom: .8rem; background: rgba(24,33,38,.025); }
.health-filter-form { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: .7rem; align-items: end; }
.health-filter-form label { margin: 0; }
.health-filter-form label > span { display: block; margin-bottom: .3rem; color: var(--dashboard-muted); font-size: .61rem; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.health-filter-form input, .health-filter-form select { width: 100%; min-height: 43px; }
.health-filter-actions { display: flex; align-items: center; justify-content: flex-end; gap: .75rem; grid-column: 1 / -1; }
.health-filter-actions a { color: var(--dashboard-muted); font-size: .74rem; font-weight: 800; }
.health-pagination { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1rem; color: var(--dashboard-muted); font-size: .72rem; }
.health-pagination div { display: flex; gap: .45rem; }
.health-pagination a { padding: .55rem .75rem; color: var(--dashboard-ink); background: rgba(24,33,38,.05); border-radius: 9px; font-weight: 800; text-decoration: none; }
.health-pagination a.is-disabled { opacity: .35; pointer-events: none; }

@media (max-width: 900px) {
  .health-capture-grid { grid-template-columns: 1fr; }
  .health-overview-grid { grid-template-columns: 1fr; }
  .health-category-capture .health-form, .health-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Authentication */
.authentication-body { min-height: 100vh; margin: 0; color: var(--dashboard-ink); background: radial-gradient(circle at 15% 15%, rgba(199,106,58,.16), transparent 34%), radial-gradient(circle at 90% 20%, rgba(83,134,163,.16), transparent 38%), var(--dashboard-canvas); }
.authentication-page { position: relative; z-index: 1; display: grid; min-height: 100vh; padding: 1.5rem; place-items: center; }
.authentication-card { width: min(470px, 100%); padding: clamp(1.6rem, 5vw, 2.7rem); background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.9); border-radius: 28px; box-shadow: 0 28px 70px rgba(24,33,38,.18); }
.authentication-mark { display: grid; width: 52px; height: 52px; margin-bottom: 1.2rem; place-items: center; color: #fff; background: var(--dashboard-accent); border-radius: 15px; box-shadow: 0 12px 26px rgba(199,106,58,.25); font-weight: 900; }
.authentication-card h1 { margin: .75rem 0 .5rem; font-size: clamp(2.4rem, 9vw, 4rem); }
.authentication-card > p { margin: 0 0 1.4rem; color: var(--dashboard-muted); line-height: 1.6; }
.authentication-form { display: grid; gap: 1rem; }
.authentication-form label > span { display: block; margin-bottom: .38rem; color: var(--dashboard-muted); font-size: .68rem; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.authentication-form input:not([type='submit']) { width: 100%; }
.authentication-form > small { color: var(--dashboard-muted); line-height: 1.5; }
.authentication-form .btn { margin-top: .35rem; padding: .85rem 1rem; }
.sidebar-sign-out { display: flex; width: calc(100% - 1rem); min-height: 48px; align-items: center; gap: .65rem; margin: .5rem; padding: .75rem 1rem; color: rgba(255,255,255,.72); background: transparent; border: 0; border-radius: 12px; font-weight: 700; text-align: left; }
.sidebar-sign-out:hover { color: #fff; background: rgba(255,255,255,.08); }
@media (max-width: 600px) {
  .health-header { align-items: stretch; flex-direction: column; }
  .health-header-mark { display: flex; justify-content: center; gap: .5rem; }
  .health-header-mark i { margin: 0; }
  .health-periods { align-items: stretch; flex-wrap: wrap; }
  .health-periods > span { width: 100%; margin: .25rem 0 0; padding: .5rem; border-top: 1px solid var(--dashboard-line); }
  .health-form, .health-stat-grid { grid-template-columns: 1fr; }
  .health-form > *, .health-field-wide { grid-column: 1; }
  .health-card-heading { align-items: flex-start; flex-direction: column; }
  .health-results-heading-end { width: 100%; justify-content: space-between; }
  .health-history article { grid-template-columns: 78px minmax(0, 1fr); }
  .health-history article > span { grid-column: 2; }
  .health-category-header { align-items: stretch; flex-direction: column; }
  .health-category-count { display: flex; justify-content: center; gap: .5rem; }
  .health-category-capture .health-form, .health-filter-form { grid-template-columns: 1fr; }
  .health-category-capture .health-form .health-field-wide, .health-filter-form > * { grid-column: 1; }
  .health-pagination { align-items: stretch; flex-direction: column; }
}

/* Finance ledger */
.finance-page { padding-bottom: 3rem; }
.finance-library-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 1.25rem; padding: clamp(.5rem, 2vw, 1.25rem) 0; }
.finance-library-header h1 { margin: .8rem 0 .65rem; }
.finance-library-header p { max-width: 650px; margin: 0; color: var(--dashboard-muted); font-size: 1.02rem; line-height: 1.65; }
.finance-library-add { display: inline-flex; align-items: center; gap: .5rem; flex: 0 0 auto; padding: .82rem 1.1rem; }
.finance-header, .finance-detail-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 1.75rem; }
.finance-header h1, .finance-detail-header h1, .finance-form-page h1 { max-width: 760px; margin: .8rem 0 .65rem; }
.finance-header p, .finance-detail-header p, .finance-form-page header p { max-width: 680px; margin: 0; color: var(--dashboard-muted); font-size: 1.02rem; line-height: 1.65; }
.finance-primary-action, .finance-detail-actions { flex: 0 0 auto; }
.finance-detail-actions { display: flex; gap: .65rem; }
.finance-hero { position: relative; align-items: center; min-height: 340px; overflow: hidden; padding: clamp(1.6rem, 5vw, 3.5rem); color: #fff; background: var(--dashboard-ink); border-radius: 32px; box-shadow: 0 24px 60px rgba(24,33,38,.2); }
.finance-hero::before, .finance-hero::after { position: absolute; content: ""; border-radius: 50%; pointer-events: none; }
.finance-hero::before { top: -180px; right: -100px; width: 460px; height: 460px; background: rgba(199,106,58,.16); }
.finance-hero::after { bottom: -190px; left: 25%; width: 360px; height: 360px; background: rgba(36,115,91,.14); }
.finance-hero-copy { position: relative; z-index: 1; max-width: 650px; }
.finance-hero h1 { color: #fff; font-size: clamp(2.5rem, 5vw, 4.5rem); }
.finance-hero p { color: rgba(255,255,255,.67); }
.finance-hero .eyebrow { color: #f2b28e; background: rgba(199,106,58,.18); }
.finance-hero-actions { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.finance-hero-link { display: inline-flex; align-items: center; gap: .4rem; color: rgba(255,255,255,.78); font-size: .85rem; font-weight: 800; text-decoration: none; }
.finance-hero-link:hover { color: #fff; }
.finance-hero-visual { position: relative; z-index: 1; width: 280px; min-height: 220px; flex: 0 0 280px; }
.finance-hero-note { position: absolute; display: grid; grid-template-columns: 38px 1fr; width: 220px; padding: 1rem; color: var(--dashboard-ink); background: #fffdf9; border: 1px solid rgba(255,255,255,.3); border-radius: 18px; box-shadow: 0 18px 40px rgba(0,0,0,.2); transform: rotate(-4deg); }
.finance-hero-note i { grid-row: 1 / 3; display: grid; width: 32px; height: 32px; place-items: center; color: #fff; background: var(--dashboard-green); border-radius: 10px; }
.finance-hero-note span { color: var(--dashboard-muted); font-size: .65rem; font-weight: 800; text-transform: uppercase; }
.finance-hero-note strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; font-weight: 500; }
.finance-hero-note.is-outgoing { top: 92px; right: 0; transform: rotate(4deg); }
.finance-hero-note.is-outgoing i { background: var(--dashboard-red); }
.finance-hero-seal { position: absolute; right: 22px; bottom: 0; display: flex; align-items: center; gap: .35rem; padding: .5rem .7rem; color: #fff; background: var(--dashboard-accent); border-radius: 999px; box-shadow: 0 10px 22px rgba(0,0,0,.2); font-size: .7rem; font-weight: 850; text-transform: uppercase; transform: rotate(-3deg); }
.finance-ledger-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin: 2rem 0 .9rem; }
.finance-ledger-heading h2 { margin: .4rem 0 .1rem; font-size: 2.25rem; }
.finance-ledger-heading p { margin: 0; color: var(--dashboard-muted); font-size: .82rem; }
.finance-legend { display: flex; gap: 1rem; color: var(--dashboard-muted); font-size: .72rem; font-weight: 750; }
.finance-legend span { display: flex; align-items: center; gap: .35rem; }
.finance-legend i { width: 9px; height: 9px; background: var(--dashboard-green); border-radius: 50%; }
.finance-legend i.is-payable { background: var(--dashboard-red); }
.finance-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1.75rem; }
.finance-summary-card { position: relative; overflow: hidden; padding: 1rem 1.15rem; background: rgba(255,255,255,.52); border: 1px solid rgba(255,255,255,.72); border-radius: 16px; }
.finance-summary-card::after { position: absolute; inset: 0 auto 0 0; width: 4px; content: ""; background: var(--dashboard-ink); opacity: .18; }
.finance-summary-positive::after { background: var(--dashboard-green); opacity: 1; }
.finance-summary-negative::after { background: var(--dashboard-red); opacity: 1; }
.finance-summary-card span, .finance-summary-card small { display: block; color: var(--dashboard-muted); }
.finance-summary-card span { font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.finance-summary-card strong { display: block; margin: .2rem 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.45rem, 2.5vw, 2rem); font-weight: 500; }
.finance-summary-card small { font-size: .74rem; }
.finance-filters { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto auto auto; gap: .65rem; margin-bottom: 1.35rem; padding: .8rem; background: var(--dashboard-paper); border: 1px solid rgba(255,255,255,.8); border-radius: 18px; box-shadow: 0 12px 32px rgba(37,47,52,.07); }
.finance-filters select, .finance-filters input { min-height: 44px; }
.finance-search { position: relative; }
.finance-search i { position: absolute; top: 50%; left: .95rem; color: var(--dashboard-muted); transform: translateY(-50%); }
.finance-search input { width: 100%; padding-left: 2.6rem; }
.finance-page turbo-frame { display: block; width: 100%; }
.finance-ledger-grid { display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.15rem; }
.finance-ledger-card { position: relative; display: flex; min-height: 390px; overflow: hidden; flex-direction: column; padding: 1.4rem 1.4rem 1.15rem 1.7rem; background: var(--dashboard-paper); border: 1px solid rgba(255,255,255,.8); border-radius: var(--dashboard-radius); box-shadow: var(--dashboard-shadow); transition: transform 180ms ease, box-shadow 180ms ease; }
.finance-card-spine { position: absolute; inset: 0 auto 0 0; width: 7px; background: linear-gradient(180deg, #3d9478, var(--dashboard-green)); }
.finance-ledger-card.is-payable .finance-card-spine { background: linear-gradient(180deg, #c76666, var(--dashboard-red)); }
.finance-ledger-card:hover { transform: translateY(-3px); box-shadow: 0 18px 42px rgba(37,47,52,.15); }
.finance-ledger-card-top, .finance-balance-row, .finance-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.finance-direction, .finance-status { display: inline-flex; padding: .42rem .62rem; color: var(--dashboard-green); background: rgba(36,115,91,.1); border-radius: 999px; font-size: .68rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.is-payable .finance-direction { color: var(--dashboard-red); background: rgba(167,70,70,.1); }
.finance-status { color: var(--dashboard-muted); background: rgba(24,33,38,.06); }
.finance-status.is-overdue { color: var(--dashboard-red); background: rgba(167,70,70,.1); }
.finance-person-mark { display: grid; width: 46px; height: 46px; place-items: center; color: #fff; background: var(--dashboard-ink); border-radius: 14px; box-shadow: 0 10px 22px rgba(24,33,38,.18); font-size: .76rem; font-weight: 850; letter-spacing: .04em; }
.finance-card-body { flex: 1; padding: 1.4rem 0 .75rem; }
.finance-card-body .finance-direction { margin-bottom: .75rem; }
.finance-ledger-card h2 { margin: 0 0 .55rem; font-size: clamp(1.55rem, 3vw, 2rem); line-height: 1.05; }
.finance-ledger-card h2 a { color: var(--dashboard-ink); text-decoration: none; }
.finance-ledger-meta { min-height: 2.4em; color: var(--dashboard-muted); font-size: .78rem; line-height: 1.5; }
.finance-card-body .finance-ledger-meta { min-height: 0; margin: .35rem 0; }
.finance-card-body .finance-ledger-meta i { width: 1rem; color: var(--dashboard-accent-dark); }
.finance-card-amounts { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding: .9rem; background: rgba(24,33,38,.035); border: 1px solid rgba(24,33,38,.05); border-radius: 16px; }
.finance-card-amounts > div:last-child { text-align: right; }
.finance-card-amounts span { display: block; color: var(--dashboard-muted); font-size: .65rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.finance-card-amounts strong { display: block; margin-top: .2rem; color: var(--dashboard-ink); font-size: 1.05rem; }
.finance-card-primary-amount strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.55rem; font-weight: 500; }
.finance-balance-row { align-items: flex-end; padding: .9rem; background: rgba(24,33,38,.035); border: 1px solid rgba(24,33,38,.05); border-radius: 16px; }
.finance-balance-row div:last-child { text-align: right; }
.finance-balance-row span, .finance-detail-summary span { display: block; color: var(--dashboard-muted); font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.finance-balance-row strong { display: block; margin-top: .18rem; font-size: 1.25rem; }
.finance-balance-row div:first-child strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.75rem; font-weight: 500; }
.finance-progress { height: 7px; margin: 1rem 0; overflow: hidden; background: rgba(24,33,38,.08); border-radius: 999px; }
.finance-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--dashboard-accent), var(--dashboard-green)); border-radius: inherit; }
.finance-card-footer { padding-top: 1rem; color: var(--dashboard-muted); border-top: 1px solid var(--dashboard-line); font-size: .8rem; }
.finance-card-footer { flex-wrap: wrap; }
.finance-card-footnote { display: flex; flex: 1 0 100%; gap: .55rem; padding-bottom: .45rem; }
.finance-card-footnote span { padding: .38rem .5rem; background: rgba(24,33,38,.045); border-radius: 999px; font-size: .68rem; white-space: nowrap; }
.finance-card-edit { display: inline-grid; width: 34px; height: 34px; place-items: center; color: var(--dashboard-muted); background: rgba(24,33,38,.045); border-radius: 10px; text-decoration: none; }
.finance-card-edit:hover { color: var(--dashboard-ink); background: rgba(24,33,38,.09); }
.finance-card-stats { padding-bottom: 1rem; }
.finance-card-actions { margin-top: 0; }
.finance-open-link, .finance-back-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 800; text-decoration: none; }
.finance-empty-state { padding: clamp(3rem, 8vw, 6rem) 1.5rem; text-align: center; background: var(--dashboard-paper); border-radius: var(--dashboard-radius); box-shadow: var(--dashboard-shadow); }
.finance-empty-state > i { font-size: 2rem; color: var(--dashboard-accent); }
.finance-empty-state h2 { margin: 1rem 0 .5rem; }
.finance-empty-state p, .finance-empty-copy { color: var(--dashboard-muted); }
.finance-back-link { margin-bottom: 1.5rem; }
.finance-detail-summary { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 1rem; overflow: hidden; background: var(--dashboard-ink); border-radius: 22px; box-shadow: var(--dashboard-shadow); }
.finance-detail-summary div { padding: 1.25rem; border-right: 1px solid rgba(255,255,255,.1); }
.finance-detail-summary div:last-child { border: 0; }
.finance-detail-summary span { color: rgba(255,255,255,.6); }
.finance-detail-summary strong { display: block; margin-top: .3rem; color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: 1.55rem; font-weight: 500; }
.finance-detail-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(270px, .8fr); gap: 1rem; align-items: start; }
.finance-detail-aside { display: grid; gap: 1rem; }
.finance-panel, .finance-form-section { padding: clamp(1.25rem, 3vw, 1.8rem); background: var(--dashboard-paper); border: 1px solid rgba(255,255,255,.8); border-radius: var(--dashboard-radius); box-shadow: var(--dashboard-shadow); }
.finance-panel h2 { margin: 0 0 1rem; font-size: 1.5rem; }
.finance-panel-heading h2 { margin: .55rem 0 1rem; font-size: 2rem; }
.finance-timeline { position: relative; }
.finance-timeline::before { position: absolute; top: 18px; bottom: 18px; left: 18px; width: 1px; content: ""; background: var(--dashboard-line); }
.finance-timeline-item { position: relative; display: grid; grid-template-columns: 38px 1fr; gap: 1rem; padding-bottom: 1.6rem; }
.finance-timeline-dot { z-index: 1; display: grid; width: 38px; height: 38px; place-items: center; color: #fff; background: var(--dashboard-green); border: 5px solid #fff; border-radius: 50%; box-sizing: border-box; }
.finance-timeline-item.is-origin .finance-timeline-dot { background: var(--dashboard-accent); }
.finance-timeline-date { color: var(--dashboard-muted); font-size: .73rem; font-weight: 750; text-transform: uppercase; }
.finance-timeline-item h3 { margin: .15rem 0; font-size: 1.12rem; }
.finance-timeline-item p { margin: .25rem 0; color: var(--dashboard-muted); }
.finance-timeline-actions { display: flex; gap: .8rem; margin-top: .5rem; font-size: .8rem; font-weight: 750; }
.finance-timeline-actions form, .finance-timeline-actions button { display: inline; padding: 0; background: none; border: 0; }
.finance-text-danger { color: var(--dashboard-red); }
.finance-facts dl { margin: 0; }
.finance-facts dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--dashboard-line); }
.finance-facts dl div:last-child { border: 0; }
.finance-facts dt { color: var(--dashboard-muted); font-size: .75rem; font-weight: 700; }
.finance-facts dd { margin: 0; text-align: right; font-size: .82rem; font-weight: 750; }
.finance-evidence { margin-top: .8rem; }
.finance-evidence-title { display: block; margin-bottom: .5rem; color: var(--dashboard-muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.finance-evidence-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: .55rem; }
.finance-evidence-item { overflow: hidden; color: var(--dashboard-ink); background: rgba(24,33,38,.04); border: 1px solid var(--dashboard-line); border-radius: 12px; font-size: .67rem; text-decoration: none; }
.finance-evidence-item img { display: block; width: 100%; height: 80px; object-fit: cover; }
.finance-evidence-item > span:last-child { display: block; overflow: hidden; padding: .45rem; text-overflow: ellipsis; white-space: nowrap; }
.finance-file-icon { display: grid; height: 80px; place-items: center; color: var(--dashboard-red); font-size: 1.6rem; }
.finance-form-page { width: min(860px, 100%); margin: 0 auto; }
.finance-form-page header { margin-bottom: 1.5rem; }
.finance-form { display: grid; gap: 1rem; }
.finance-form-section h2 { margin: .6rem 0 1.25rem; font-size: 1.8rem; }
.finance-choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-bottom: 1.25rem; }
.finance-choice { margin: 0 !important; text-transform: none !important; letter-spacing: normal !important; cursor: pointer; }
.finance-choice input { position: absolute; opacity: 0; }
.finance-choice span { display: grid; grid-template-columns: 32px 1fr; gap: .1rem .65rem; padding: 1rem; border: 1px solid var(--dashboard-line); border-radius: 16px; transition: 160ms ease; }
.finance-choice i { grid-row: 1 / 3; display: grid; place-items: center; color: var(--dashboard-accent-dark); font-size: 1.2rem; }
.finance-choice strong, .finance-choice small { display: block; }
.finance-choice strong { color: var(--dashboard-ink); font-size: .9rem; }
.finance-choice small { color: var(--dashboard-muted); font-size: .73rem; }
.finance-choice input:checked + span { background: rgba(199,106,58,.08); border-color: var(--dashboard-accent); box-shadow: 0 0 0 3px rgba(199,106,58,.1); }
.finance-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.finance-field-wide { grid-column: 1 / -1; }
.finance-field input, .finance-field select, .finance-field textarea { width: 100%; }
.finance-form-hint { color: var(--dashboard-muted); font-size: .86rem; }
.finance-upload { display: grid; margin-top: 1rem; padding: 1.3rem; place-items: center; text-align: center; background: rgba(199,106,58,.045); border: 1px dashed rgba(158,78,40,.35); border-radius: 16px; }
.finance-upload i { color: var(--dashboard-accent); font-size: 1.5rem; }
.finance-upload label { margin: .3rem 0; }
.finance-upload input { width: min(100%, 440px); min-height: auto; }
.finance-form-actions { display: flex; justify-content: flex-end; gap: .7rem; }
.finance-payment-balance { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; padding: 1rem; color: #fff; background: var(--dashboard-ink); border-radius: 16px; }
.finance-payment-balance span { color: rgba(255,255,255,.65); font-size: .78rem; }
.finance-payment-balance strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.4rem; font-weight: 500; }

@media (max-width: 900px) {
  .finance-hero-visual { display: none; }
  .finance-summary { grid-template-columns: repeat(2, 1fr); }
  .finance-filters { grid-template-columns: 1fr 1fr; }
  .finance-search { grid-column: 1 / -1; }
  .finance-detail-grid { grid-template-columns: 1fr; }
  .finance-ledger-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .finance-library-header { align-items: stretch; flex-direction: column; gap: 1rem; }
  .finance-library-add { justify-content: center; }
  .finance-header, .finance-detail-header { align-items: stretch; flex-direction: column; gap: 1rem; }
  .finance-detail-actions { flex-wrap: wrap; }
  .finance-primary-action { text-align: center; }
  .finance-hero { min-height: auto; padding: 1.5rem; border-radius: 24px; }
  .finance-hero-actions, .finance-ledger-heading { align-items: stretch; flex-direction: column; }
  .finance-hero-actions .btn { text-align: center; }
  .finance-legend { flex-wrap: wrap; }
  .finance-summary { grid-template-columns: 1fr 1fr; }
  .finance-ledger-grid { grid-template-columns: 1fr; }
  .finance-summary-card { padding: .95rem; }
  .finance-filters, .finance-form-grid, .finance-choice-grid { grid-template-columns: 1fr; }
  .finance-filters > * { grid-column: 1; }
  .finance-detail-summary { grid-template-columns: repeat(2, 1fr); }
  .finance-detail-summary div:nth-child(2) { border-right: 0; }
  .finance-detail-summary div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.1); }
  .finance-form-actions { align-items: stretch; flex-direction: column-reverse; }
}

@media (max-width: 760px) {
  .expense-line-item { grid-template-columns: 1fr 1fr; }
  .expense-item-name { grid-column: 1 / -1; }
  .expense-line-total { padding: .5rem 0; text-align: left; }
  .expense-items-heading { flex-direction: column; }
  .todo-archive-grid { grid-template-columns: 1fr; }
  .todo-archive-grid article { grid-template-columns: 42px minmax(0, 1fr); }
  .todo-archive-actions { grid-column: 1 / -1; }
  .todo-header-actions, .todo-danger-zone { align-items: stretch; flex-direction: column; }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
