:root {
  --ink: #243d35;
  --muted: #7a8780;
  --green: #287256;
  --light: #eaf2eb;
  --line: #e2e8df;
  --paper: #f7f8f3;
  --danger: #af573f;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 13px;
  color: var(--ink);
}
button:hover {
  background: var(--light);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: var(--green);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
:focus-visible {
  outline: 3px solid #67a584;
  outline-offset: 3px;
}
input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #fff;
  color: var(--ink);
  min-width: 0;
  max-width: 100%;
}
textarea {
  resize: vertical;
  width: 100%;
}
.sidebar {
  width: 246px;
  position: fixed;
  inset: 0 auto 0 0;
  border-right: 1px solid var(--line);
  background: #f0f3eb;
  padding: 34px 24px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  color: var(--ink);
  font-weight: 700;
  font-size: 19px;
}
.brand small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
  font-weight: 400;
}
.brand-mark {
  display: grid;
  place-items: center;
  background: var(--green);
  color: white;
  width: 43px;
  height: 46px;
  border-radius: 10px;
  font-family: Georgia, serif;
  font-size: 26px;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: var(--muted);
  margin: 60px 10px 16px;
}
.sidebar nav {
  display: grid;
  gap: 7px;
}
.sidebar nav a {
  padding: 14px;
  color: #63766a;
  border-radius: 9px;
  font-size: 14px;
}
.sidebar nav a span {
  float: right;
  font-size: 10px;
  color: #93a393;
  margin-top: 3px;
}
.sidebar nav a[aria-current] {
  background: #dfeadc;
  color: #286342;
  font-weight: 700;
}
.side-note {
  margin-top: auto;
  padding: 18px 6px;
  font-size: 12px;
  line-height: 1.8;
}
.side-note small {
  display: block;
  color: var(--muted);
  margin-top: 10px;
}
.tiny-dot {
  display: inline-block;
  background: #67967b;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 6px;
}
main {
  margin-left: 246px;
  max-width: 1450px;
  padding: 0 62px 28px;
}
.topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--muted);
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 46px 0 30px;
  gap: 20px;
}
.eyebrow {
  font-size: 10px;
  color: var(--green);
  letter-spacing: 2px;
  font-weight: 700;
}
h1 {
  font-size: 36px;
  letter-spacing: -1.5px;
  font-weight: 650;
  margin: 14px 0;
}
h1 span {
  color: #77a380;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 15px;
}
.muted,
.hint {
  color: var(--muted);
  line-height: 1.7;
}
.muted {
  font-size: 13px;
}
.hint {
  font-size: 11px;
}
.quiet {
  background: transparent;
  font-size: 12px;
}
.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.primary:hover {
  background: #205c46;
}
.quick-add {
  display: flex;
  align-items: center;
  position: relative;
  background: white;
  border: 1px solid #d4dfd0;
  box-shadow: 0 4px 15px #243d3505;
  border-radius: 12px;
  padding: 10px 12px;
  gap: 12px;
}
.quick-add > span {
  font-size: 25px;
  color: #8ba291;
}
.quick-add input {
  border: 0;
  flex: 1;
  min-width: 0;
}
.quick-add .form-error:empty {
  display: none;
}
.quick-add .form-error:not(:empty) {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  z-index: 1;
}
.daily-section {
  margin: 32px 0;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-heading a {
  font-size: 12px;
}
.daily-empty {
  padding: 18px;
  border: 1px dashed #d6ded0;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  gap: 20px;
  overflow: auto;
}
.tabs button {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 16px 2px;
  white-space: nowrap;
  font-size: 13px;
  color: var(--muted);
}
.tabs button.active {
  color: var(--green);
  border-bottom: 2px solid var(--green);
  font-weight: 700;
}
.filter-row {
  display: flex;
  gap: 7px;
  margin: 18px 0;
}
.filter-row input,
.filter-row select,
.filter-row button {
  font-size: 11px;
  padding: 9px;
  max-width: 150px;
}
.search-label {
  flex: 1;
}
.filter-row .search-label input {
  width: 100%;
  max-width: none;
}
.tag-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  margin-bottom: 16px;
}
.list-caption {
  display: flex;
  justify-content: space-between;
  color: #849084;
  font-size: 11px;
  padding: 10px 0 14px;
}
.list-caption span {
  font-size: 10px;
}
.task-list {
  display: grid;
  gap: 9px;
}
.task-card {
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
  padding: 20px;
}
.task-main {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}
.check-button {
  flex-shrink: 0;
  width: 21px;
  height: 21px;
  padding: 0;
  margin-top: 2px;
  border-radius: 6px;
  border: 1.5px solid #c5d2bf;
}
.check-button.checked {
  background: var(--green);
  color: #fff;
}
.task-content {
  flex: 1;
  min-width: 0;
}
.task-title {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 14px;
  text-align: left;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.done .task-title {
  text-decoration: line-through;
  color: var(--muted);
}
.task-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: #8b9489;
  font-size: 10px;
  margin-top: 8px;
  align-items: center;
}
.tag {
  padding: 3px 7px;
  border-radius: 4px;
  background: #eff3e9;
  color: #7d8a68;
}
.important {
  color: #a98c45;
}
.overdue {
  color: var(--danger);
}
.task-actions {
  display: flex;
  gap: 5px;
}
.task-actions button {
  font-size: 10px;
  background: #f7f8f3;
  border: 0;
  padding: 6px 8px;
}
.description {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.8;
}
summary {
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  margin-top: 10px;
}
.empty-state {
  text-align: center;
  padding: 60px 20px;
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.empty-state p {
  font-size: 12px;
  color: var(--muted);
}
.empty-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--light);
  border-radius: 50%;
  color: #67967b;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 20px;
  font-size: 11px;
}
footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  color: #9aa395;
  font-size: 10px;
}
footer span {
  float: right;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  width: 620px;
  max-width: calc(100% - 24px);
  max-height: 90vh;
  box-shadow: 0 20px 100px #243d3522;
}
dialog::backdrop {
  background: #1f302f55;
  backdrop-filter: blur(3px);
}
.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1.5px;
}
.dialog-top button {
  border: 0;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
fieldset > label,
.two-col > label {
  display: grid;
  gap: 7px;
  margin: 14px 0;
  font-size: 12px;
}
.checkbox {
  display: flex !important;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}
.tag-picks {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.inline-form {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.inline-form input:not([type="hidden"]) {
  flex: 1;
}
.inline-form .form-error {
  flex-basis: 100%;
  margin: 0;
}
.checklist-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 10px 0;
}
.checklist-row input:not([type="checkbox"]) {
  flex: 1;
  padding: 7px;
  font-size: 12px;
}
.checklist-row button {
  padding: 6px;
  font-size: 11px;
}
.form-error {
  color: var(--danger);
  font-size: 12px;
  line-height: 1.7;
}
.form-error button {
  margin: 6px;
  font-size: 11px;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}
.danger {
  color: var(--danger);
}
.editor-actions {
  display: flex;
  gap: 10px;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 15px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 30px #0002;
  max-width: 90vw;
  z-index: 100;
  font-size: 13px;
}
#toast button {
  margin-left: 15px;
  padding: 5px 10px;
  font-size: 11px;
}
.skip {
  position: fixed;
  top: -100px;
}
.skip:focus {
  top: 5px;
  z-index: 101;
  background: white;
  padding: 10px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 15px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
}
.panel p {
  line-height: 1.7;
}
.badge {
  background: var(--light);
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 11px;
}
.loading {
  opacity: 0.65;
}
.htmx-request {
  opacity: 0.6;
}
@media (min-width: 1500px) {
  main {
    margin-right: auto;
  }
}
@media (max-width: 1100px) {
  main {
    padding: 0 28px 24px;
    margin-left: 210px;
  }
  .sidebar {
    width: 210px;
    padding: 30px 17px;
  }
  .filter-row {
    flex-wrap: wrap;
  }
  .search-label {
    flex-basis: 100%;
  }
  .task-actions {
    flex-direction: column;
  }
}
@media (max-width: 700px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 18px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    font-size: 16px;
  }
  .brand-mark {
    width: 34px;
    height: 36px;
    font-size: 21px;
  }
  .nav-label,
  .side-note {
    display: none;
  }
  .sidebar nav {
    display: flex;
    margin-top: 17px;
    gap: 4px;
    justify-content: space-between;
  }
  .sidebar nav a {
    padding: 9px;
    font-size: 12px;
  }
  .sidebar nav a span {
    display: none;
  }
  main {
    margin: 0;
    padding: 0 18px 24px;
  }
  .topline {
    padding: 20px 0;
    font-size: 8px;
  }
  .page-heading {
    margin: 30px 0 24px;
    align-items: flex-start;
  }
  h1 {
    font-size: 27px;
  }
  .page-heading .quiet {
    font-size: 10px;
    white-space: nowrap;
  }
  .quick-add {
    gap: 3px;
    padding: 7px;
  }
  .quick-add input {
    font-size: 12px;
  }
  .quick-add button {
    font-size: 12px;
  }
  .tabs {
    gap: 18px;
  }
  .tabs button {
    font-size: 12px;
  }
  .task-card {
    padding: 16px 12px;
  }
  .task-main {
    gap: 10px;
    flex-wrap: wrap;
  }
  .task-title {
    font-size: 13px;
  }
  .task-actions {
    flex-direction: row;
    margin-left: 31px;
    width: 100%;
  }
  .task-meta {
    font-size: 10px;
    gap: 7px;
  }
  .two-col {
    gap: 10px;
  }
  .checklist-row {
    flex-wrap: wrap;
  }
  .checklist-row input:not([type="checkbox"]) {
    min-width: 100px;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
  footer {
    margin-top: 40px;
  }
  #toast {
    width: 90vw;
  }
  .filter-row select {
    max-width: 135px;
  }
}
.goal-card {
  display: flex;
  justify-content: space-between;
  border: 1px solid #ccdcc7;
  background: #edf3e6;
  padding: 28px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 30px;
}
.goal-number {
  font-family: Georgia, serif;
  font-size: 130px;
  line-height: 1.4;
  color: #d4e2c9;
  align-self: center;
}
.reaction-path {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 24px 0;
  color: var(--green);
  font-family: Georgia, serif;
  font-size: 23px;
}
.reaction-path small {
  display: block;
  font:
    10px -apple-system,
    sans-serif;
  color: var(--muted);
  margin-top: 10px;
}
.reaction-path b {
  font-size: 14px;
  font-weight: 400;
}
.element-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}
.element-tile {
  background: white;
  padding: 16px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: grid;
  gap: 9px;
}
.element-tile strong {
  font:
    32px Georgia,
    serif;
  color: var(--green);
}
.element-tile > span:last-child {
  font-size: 17px;
}
.element-tile small {
  font-size: 10px;
  color: var(--muted);
}
.craft-grid .panel {
  padding: 18px;
}
.formula {
  font:
    23px Georgia,
    serif;
  color: var(--green);
}
.craft-grid input[type="number"],
.reaction-list input[type="number"] {
  max-width: 75px;
}
.inventory-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}
.inventory-list > div {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 9px;
  border-bottom: 1px solid var(--line);
}
.inventory-list small {
  color: var(--muted);
}
.match-row {
  display: flex;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}
.match-row label {
  display: grid;
  gap: 7px;
  font-size: 12px;
}
.match-row input {
  width: 90px;
}
.match-result {
  display: block;
  margin-top: 14px;
}
.reaction-list {
  display: grid;
  gap: 12px;
}
.equation {
  font-size: 14px;
  line-height: 2;
}
.equation small {
  color: var(--muted);
  font-size: 11px;
}
.undiscovered {
  background: #f2f4ed;
}
.history-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.history-row strong {
  font-size: 12px;
}
.history-row p {
  margin: 5px 0;
}
.history-row time {
  margin-left: auto;
}
@media (max-width: 700px) {
  .goal-number {
    display: none;
  }
  .goal-card {
    padding: 20px;
  }
  .reaction-path {
    font-size: 17px;
    gap: 11px;
  }
  .element-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .element-tile {
    padding: 12px;
  }
  .element-tile strong {
    font-size: 25px;
  }
  .match-row {
    flex-wrap: wrap;
  }
  .match-row select {
    max-width: 200px;
  }
  .inventory-list {
    grid-template-columns: 1fr;
  }
  .history-row {
    flex-wrap: wrap;
  }
  .history-row time {
    margin-left: 0;
  }
  .section-heading {
    gap: 10px;
  }
  .section-heading .hint {
    text-align: right;
    max-width: 150px;
  }
}
.daily-date-range {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0;
  font-size: 11px;
}
.daily-date-range[hidden] {
  display: none;
}
.daily-date-range label {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Keep the day's actions ahead of capture and advanced organization. */
.menu-toggle { display: none; }
.today-heading { margin: 34px 0 24px; }
.today-heading h1 { margin: 8px 0 10px; }
.routine-link { font-size: 12px; white-space: nowrap; }
.task-workspace { max-width: 980px; }
.filter-details { margin: 16px 0 6px; }
.filter-details > summary { width: fit-content; padding: 8px 0; font-size: 12px; color: #52685b; }
.filter-details > summary span { color: var(--muted); margin-left: 12px; font-size: 11px; }
.filter-details[open] { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.list-caption { align-items: center; padding: 18px 0; }
.list-caption strong { font-size: 16px; color: var(--ink); }
.task-card { padding: 18px 20px; }
.task-title { font-size: 15px; font-weight: 550; }
.task-meta { color: #68786e; }
.routine-badge { color: var(--green); background: var(--light); padding: 3px 7px; border-radius: 4px; }
.check-button { width: 26px; height: 26px; border-radius: 50%; position: relative; }
.check-button::after { content: ''; position: absolute; inset: -9px; }
.add-section { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 10px; }
.add-section h2 { font-size: 13px; font-weight: 600; color: #63766a; margin: 12px 0; }
.quick-plan { display: flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; }
.quick-plan input { flex: none; accent-color: var(--green); }
.quick-add { flex-wrap: wrap; }
.quick-add .form-error:not(:empty) { position: static; flex-basis: 100%; margin: 0; }
.pagination:not(:has(button)) { display: none; }
@media (max-width: 700px) {
  .sidebar { position: relative; padding: 14px 18px; }
  .menu-toggle { display: grid; place-items: center; position: absolute; top: 14px; right: 18px; width: 44px; height: 44px; font-size: 22px; padding: 0; background: transparent; }
  .sidebar nav { display: none; }
  .sidebar.menu-open nav { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 18px; }
  .sidebar nav a { padding: 14px 12px; font-size: 13px; }
  .brand small { margin-top: 3px; }
  .brand-mark { height: 40px; }
  body[data-page="todos"] .topline { padding: 16px 0 0; border: 0; }
  body[data-page="todos"] .topline > span:first-child { display: none; }
  .today-heading { margin: 22px 0 18px; gap: 8px; align-items: center; }
  .today-heading .eyebrow { display: none; }
  .today-heading h1 { font-size: 29px; margin-top: 0; }
  .today-heading .muted { font-size: 12px; margin-bottom: 0; }
  .routine-link { font-size: 11px; }
  .tabs { gap: 20px; }
  .tabs button { min-height: 44px; }
  .filter-details { margin-top: 8px; }
  .filter-details > summary { min-height: 40px; display: list-item; padding-top: 12px; }
  .task-card { padding: 16px 14px; }
  .task-title { font-size: 15px; }
  .task-actions { margin-left: 36px; }
  .task-actions button { min-height: 36px; padding: 8px 12px; font-size: 11px; }
  .quick-add { padding: 10px; gap: 8px; }
  .quick-add > input { flex-basis: calc(100% - 40px); font-size: 16px; }
  .quick-add > .quick-plan { margin-left: 8px; margin-right: auto; min-height: 36px; }
  .quick-add > button { min-height: 40px; padding: 9px 20px; }
  .list-caption span { font-size: 10px; }
  .filter-row input, .filter-row select, .filter-row button { min-height: 40px; }
}

/* Account entry and session controls */
.auth-page{display:flex;min-height:100dvh;align-items:center;justify-content:center;padding:24px}
.auth-page .auth-card{margin:0;width:100%;max-width:440px;padding:36px;background:#fff;border:1px solid #e1e7e5;border-radius:20px}
.auth-card .brand{margin-bottom:36px}.auth-card h1{font-size:28px}.auth-card .tabs{margin:24px 0}.auth-card .tabs [aria-pressed=true]{background:#e2efea;color:#225f4e}
.auth-card form{display:grid;gap:10px}.auth-card label{margin-top:8px}.auth-card input{width:100%;box-sizing:border-box}.auth-card .primary{margin-top:8px}.auth-divider{text-align:center;color:#737e78;margin:22px 0}.google-login{display:block;text-align:center;width:100%;padding:12px;border:1px solid #cbd6d0;border-radius:10px;text-decoration:none;box-sizing:border-box}.auth-footnote{margin-top:24px;font-size:12px}.account-menu{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.account-menu form{margin:0}
@media(max-width:600px){.auth-page{padding:16px}.auth-page .auth-card{padding:24px}.account-menu{gap:6px}}
