/* Direction: DayFlow — warm beige paper, peach accent, charcoal navigation, a soft serif display */
/* Completed by the platform from the short form: both modes, every
   palette token, each text-on-ground pair at its floor. To restyle, write the
   short form again (the decisions in one :root) and it is completed again. */

:root {
  --canvas: #f5eee4;
  --surface: #fffaf3;
  --surface-2: #ebdfd0;
  --border: #e0d1be;
  --border-strong: #b5aea5;
  --ink: #1f1b18;
  --muted: #655a51;
  --accent: #e8a283;
  --accent-hover: #c58a6f;
  --accent-ink: #201712;
  --accent-text: #9a4727;
  --accent-strong: #7d3414;
  --accent-soft: #fbe6da;
  --accent-border: #efccb8;
  --success: #3f7a55;
  --success-ink: #ffffff;
  --success-soft: #dfe0d3;
  --success-strong: #356748;
  --warning: #a8620f;
  --warning-ink: #ffffff;
  --warning-soft: #ecddca;
  --warning-strong: #8f530d;
  --danger: #b4392f;
  --danger-ink: #ffffff;
  --danger-soft: #edd8ce;
  --danger-strong: #a6342b;
  --chart-1: #b97759;
  --chart-2: #77922d;
  --chart-3: #168477;
  --chart-4: #2e8dce;
  --chart-5: #7f5aad;
  --chart-6: #bc6398;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --display-weight: 500;
  --display-tracking: -0.02em;
  --radius-card: 20px;
  --radius-btn: 12px;
  --radius-input: 12px;
  --shadow-card: 0 1px 2px rgba(70, 45, 20, 0.05), 0 10px 28px rgba(70, 45, 20, 0.07);
  --x-nav: #1f1c1a;
  --x-nav-hover: #2f2a27;
  --x-nav-ink: #f5eee4;
  --x-nav-muted: #b9ada1;
  --x-on-photo: #ffffff;
  --x-c1: #d9825b;
  --x-c2: #3a3532;
  --x-c3: #9a8570;
  --x-c4: #5f8a68;
  --x-c5: #b8687f;
  --x-c6: #c4973a;
  --font-mono: "JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --eyebrow-tracking: 0.08em;
}

html[data-theme="dark"] {
  --canvas: #201712;
  --surface: #362e2a;
  --surface-2: #2b231e;
  --border: #3f3733;
  --border-strong: #635d59;
  --ink: #f5eee4;
  --muted: #a09890;
  --accent: #e8a283;
  --accent-hover: #ebb096;
  --accent-ink: #201712;
  --accent-text: #e8a283;
  --accent-strong: #e8a283;
  --accent-soft: #4c362b;
  --accent-border: #7a5645;
  --success: #3f7a55;
  --success-ink: #ffffff;
  --success-soft: #272d21;
  --success-strong: #75a086;
  --warning: #a8620f;
  --warning-ink: #ffffff;
  --warning-soft: #3e2811;
  --warning-strong: #c09053;
  --danger: #b4392f;
  --danger-ink: #ffffff;
  --danger-soft: #411e18;
  --danger-strong: #ce7c76;
  --chart-1: #e8a283;
  --chart-2: #aecb68;
  --chart-3: #34b587;
  --chart-4: #49cffc;
  --chart-5: #918ce6;
  --chart-6: #ea9fea;
}

/* DayFlow shell, calendar and small motion. Tokens only. */
.df-side {
  position: fixed; inset: 0 auto 0 0; width: 16rem; z-index: 30;
  display: none; flex-direction: column; gap: .25rem; padding: 1rem .75rem;
  background: var(--x-nav); color: var(--x-nav-ink); overflow-y: auto;
  transition: width .2s ease;
}
.df-main { min-height: 100vh; transition: padding-left .2s ease; }
@media (min-width: 1024px) {
  .df-side { display: flex; }
  .df-main { padding-left: 16rem; }
  body.nav-collapsed .df-side { width: 4.75rem; }
  body.nav-collapsed .df-main { padding-left: 4.75rem; }
  body.nav-collapsed .df-label { display: none; }
  body.nav-collapsed .df-side .df-link { justify-content: center; }
}
.df-link {
  display: flex; align-items: center; gap: .75rem; padding: .6rem .8rem;
  border-radius: 12px; color: var(--x-nav-muted); font-size: .95rem;
  transition: background .15s, color .15s;
}
.df-link:hover { background: var(--x-nav-hover); color: var(--x-nav-ink); }
.df-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.df-link[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.df-sheet { background: var(--x-nav); color: var(--x-nav-ink); }

.df-bottom {
  position: fixed; inset: auto 0 0 0; z-index: 25; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--x-nav); color: var(--x-nav-muted); padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom));
}
.df-bottom a, .df-bottom button {
  display: flex; flex-direction: column; align-items: center; gap: .15rem; font-size: .7rem; padding: .35rem 0; border-radius: 10px;
}
.df-bottom [aria-current="page"] { color: var(--accent); }
@media (min-width: 1024px) { .df-bottom { display: none; } }

.df-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.df-cal > * { background: var(--surface); }
.df-cell { min-height: 4.25rem; padding: .35rem; display: flex; flex-direction: column; gap: 2px; transition: background .15s; }
.df-cell:hover { background: var(--accent-soft); }
.df-cell.out { background: var(--surface-2); opacity: .75; }
.df-cell.today .df-num { background: var(--accent); color: var(--accent-ink); }
.df-cell.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.df-num { width: 1.6rem; height: 1.6rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.df-dot { width: .4rem; height: .4rem; border-radius: 999px; display: inline-block; }
.df-chip { display: block; font-size: .7rem; line-height: 1.25; padding: 1px 5px; border-radius: 6px; background: var(--surface-2); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--x-c1); }
@media (min-width: 640px) { .df-cell { min-height: 6.5rem; } }
@media (min-width: 1024px) { .df-cell.big { min-height: 7.5rem; } }

.df-ring { --p: 0; width: 4.5rem; height: 4.5rem; border-radius: 999px; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-2) 0); }
.df-ring > span { width: 3.5rem; height: 3.5rem; border-radius: 999px; background: var(--surface); display: grid; place-items: center; font-weight: 700; font-size: .95rem; }
.df-bar { height: .5rem; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.df-bar > i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .6s ease; }
.df-bar.warn > i { background: var(--danger); }

.df-col { display: flex; align-items: flex-end; gap: .35rem; height: 9rem; }
.df-col > div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .25rem; height: 100%; }
.df-col .pair { display: flex; align-items: flex-end; gap: 3px; height: 100%; width: 100%; justify-content: center; }
.df-col .pair i { display: block; width: 38%; max-width: 1.4rem; border-radius: 6px 6px 0 0; min-height: 2px; }

.df-rise { animation: df-rise .5s ease-out both; }
@keyframes df-rise { from { transform: translateY(10px); } to { transform: none; } }
html.reduced-motion .df-rise { animation: none; }
.df-hero-float { animation: df-float 7s ease-in-out infinite; }
@keyframes df-float { 50% { transform: translateY(-8px); } }
html.reduced-motion .df-hero-float { animation: none; }

.df-card-link { position: relative; transition: transform .15s ease, box-shadow .15s ease; }
.df-card-link:hover { transform: translateY(-2px); }
.df-card-link a.stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.df-card-link a.stretch:focus-visible { outline: none; }
.df-card-link:has(a.stretch:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.df-z { position: relative; z-index: 2; }
.htmx-request.df-busy { opacity: .6; pointer-events: none; }
details.df-faq summary { cursor: pointer; list-style: none; }
details.df-faq summary::-webkit-details-marker { display: none; }
details.df-faq[open] .df-plus { transform: rotate(45deg); }
.df-plus { transition: transform .2s ease; }
