/* Threefold – the shell's own styles (home screen). Shared parts come from the house kit (/house/house.css).
   The three section colours below are the kit's planner / sport / recipes accents, used side by side on the home screen
   (the kit sets one accent per page; the home screen needs all three at once). */
.tf-home {
  --tf-planner: #2456d6; --tf-planner-text: #ffffff; --tf-planner-ink: #2456d6;
  --tf-sport: #e8711a;   --tf-sport-text: #1f0e00;   --tf-sport-ink: #b5530c;
  --tf-recipes: #f2c14e; --tf-recipes-text: #2a1f00; --tf-recipes-ink: #8a6100;
}
:root[data-theme='dark'] .tf-home {
  --tf-planner: #6b95f2; --tf-planner-text: #0c1220; --tf-planner-ink: #8aacf5;
  --tf-sport: #f39a4c;   --tf-sport-text: #1f0e00;   --tf-sport-ink: #f6ad6a;
  --tf-recipes: #f2c14e; --tf-recipes-text: #241a00; --tf-recipes-ink: #f2c14e;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .tf-home {
    --tf-planner: #6b95f2; --tf-planner-text: #0c1220; --tf-planner-ink: #8aacf5;
    --tf-sport: #f39a4c;   --tf-sport-text: #1f0e00;   --tf-sport-ink: #f6ad6a;
    --tf-recipes: #f2c14e; --tf-recipes-text: #241a00; --tf-recipes-ink: #f2c14e;
  }
}

.tf-main { max-width: var(--hk-max); margin: 0 auto; padding: 18px 16px 40px; display: grid; gap: 26px; }

/* The three large section buttons */
.tf-sections { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tf-sec {
  --c: var(--accent); --c-text: var(--accent-text);
  display: flex; flex-direction: column; align-items: flex-start; gap: 18px; min-height: 150px; padding: 18px;
  border-radius: calc(var(--radius) + 4px); background: var(--c); color: var(--c-text); text-decoration: none;
  box-shadow: var(--shadow); transition: transform 0.12s ease, box-shadow 0.12s ease;
}
a.tf-sec:hover { transform: translateY(-2px); }
a.tf-sec:active { transform: translateY(0); }
a.tf-sec:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.tf-sec-planner { --c: var(--tf-planner); --c-text: var(--tf-planner-text); }
.tf-sec-sport   { --c: var(--tf-sport);   --c-text: var(--tf-sport-text); }
.tf-sec-recipes { --c: var(--tf-recipes); --c-text: var(--tf-recipes-text); }
.tf-sec.is-soon { opacity: 0.45; box-shadow: none; cursor: default; filter: saturate(0.7); }
.tf-sec-tile {
  width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; letter-spacing: 0.03em; background: color-mix(in srgb, var(--c-text) 16%, transparent);
}
.tf-sec-text { display: grid; gap: 4px; margin-top: auto; }
.tf-sec-name { font-size: 1.45rem; font-weight: 750; line-height: 1.1; }
.tf-sec-about { font-size: 0.86rem; opacity: 0.85; line-height: 1.3; }

/* Today */
.tf-today-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.tf-today-head h2 { margin: 0; font-size: 1.25rem; }
.tf-today-date { color: var(--muted); }
.tf-today-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; align-items: start; }
.tf-card { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--c, var(--border)); border-radius: var(--radius); padding: 14px 16px; }
.tf-card-planner { --c: var(--tf-planner); --ink: var(--tf-planner-ink); }
.tf-card-sport   { --c: var(--tf-sport);   --ink: var(--tf-sport-ink); }
.tf-card-recipes { --c: var(--tf-recipes); --ink: var(--tf-recipes-ink); }
.tf-card.is-soon { opacity: 0.6; }
.tf-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tf-card-head h3 { margin: 0; font-size: 1.02rem; }
.tf-card-link { color: var(--ink); text-decoration: none; font-weight: 600; white-space: nowrap; }
.tf-card-sub { color: var(--muted); font-size: 0.88rem; margin: 4px 0 8px; }
.tf-rows { display: grid; }
.tf-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0;
  border-top: 1px solid var(--border); color: inherit; text-decoration: none;
}
.tf-row:first-child { border-top: none; }
.tf-row:hover .tf-row-name { color: var(--ink); }
.tf-row-main { display: grid; gap: 2px; min-width: 0; }
.tf-row-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-row-sub { color: var(--muted); font-size: 0.82rem; }
.tf-row-sub.is-overdue { color: var(--danger); }
.tf-row-side { color: var(--muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Settings */
.tf-steps { padding-left: 1.2em; display: grid; gap: 6px; }
.tf-muted { color: var(--muted); }

@media (max-width: 760px) {
  .tf-today-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .tf-main { padding: 14px 12px 32px; gap: 22px; }
  .tf-sections { grid-template-columns: 1fr; gap: 10px; }
  .tf-sec { flex-direction: row; align-items: center; min-height: 0; padding: 16px; gap: 14px; }
  .tf-sec-text { margin-top: 0; }
  .tf-sec-name { font-size: 1.25rem; }
}
