/* Time tracking (planner/time). Colors come from validated #rrggbb values. */
/* A category's color swatch (Megg, Nov 15: activities get no color dot of their own;
   the category's swatch, header or tag carries the color). Soft rounded square. */
.tt-swatch { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 4px; vertical-align: middle; flex-shrink: 0; }
.tt-swatch--untracked { background: repeating-linear-gradient(45deg, #e5e7eb, #e5e7eb 2px, #f9fafb 2px, #f9fafb 4px); border: 1px solid #d1d5db; }
.tt-swatch--later { background: #fff; border: 1px solid #d1d5db; }
/* An activity's category where nothing around it names one (log rows, the slot
   table, the clocked-in timer): a small rounded tag. */
.tt-cat-tag { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.05rem 0.5rem; border-radius: 999px; background: #f3f4f6; color: #4b5563; font-size: 0.75rem; font-weight: 500; line-height: 1.4; vertical-align: middle; white-space: nowrap; }
.tt-cat-tag .tt-swatch { width: 0.6rem; height: 0.6rem; border-radius: 3px; }
.tt-panel { height: auto; }
/* No one-side accent stripe (Megg, Nov 14): the panel head is tinted and its title gets an indigo dot. */
.tt-panel > .ayat-planner-panel__head { background: #f5f7ff; }
.tt-panel .ayat-planner-panel__title::before { content: ""; display: inline-block; width: 0.55rem; height: 0.55rem; margin-right: 0.5rem; border-radius: 999px; background: #6366f1; box-shadow: 0 0 0 3px #e0e7ff; vertical-align: 0.1em; }
.tt-daynav { flex-wrap: wrap; }

.tt-bar { position: relative; height: 1.75rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.tt-bar__seg { position: absolute; top: 0; bottom: 0; min-width: 1px; }
.tt-bar__seg--untracked { background: repeating-linear-gradient(45deg, #e5e7eb, #e5e7eb 4px, #f9fafb 4px, #f9fafb 8px); }
.tt-bar__seg--running { box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.7); animation: tt-pulse 2s ease-in-out infinite; }
.tt-bar__now { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #111827; }
@keyframes tt-pulse { 50% { opacity: 0.75; } }
.tt-bar__ticks { position: relative; height: 1.1rem; margin-bottom: 0.5rem; font-size: 0.625rem; color: #9ca3af; }
.tt-bar__ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.tt-bar__ticks span:first-child { transform: none; }
.tt-bar__ticks span:last-child { transform: translateX(-100%); }
.tt-totals { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; margin-bottom: 0.75rem; font-size: 0.8125rem; }
.tt-totals__item { display: inline-flex; align-items: center; gap: 0.3rem; }
.tt-totals__item--sum { color: #4b5563; }
/* The legend, grouped like the schedule: one line per category (its header, then
   its activities), wrapping; Untracked / Later today on their own line. */
.tt-legend { flex-direction: column; gap: 0.3rem; line-height: 1.4; }
.tt-legend__group, .tt-legend__extras { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.35rem; }
.tt-legend__head { font-weight: 600; color: #111827; }
.tt-legend__head .tt-swatch { margin-right: 0.1rem; }
.tt-legend__sum { font-weight: 400; color: #6b7280; }
.tt-legend__group .tt-totals__item:not(.tt-legend__head) { color: #374151; }
@media (max-width: 575.98px) {
  /* Phone: the header on its own line, its activities wrapping under it. */
  .tt-legend { gap: 0.5rem; }
  .tt-legend__group, .tt-legend__extras { gap: 0.25rem 0.2rem; }
  .tt-legend__head { flex-basis: 100%; justify-content: flex-start; }
  .tt-legend__group .tt-totals__item:not(.tt-legend__head) { padding-left: 0.5rem; }
}
/* The journal breakdown's category headers light their whole category, like the chart rows. */
.tt-journal__cat-head[tabindex] { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.1rem 0.55rem; margin-left: -0.55rem; border-radius: 999px; transition: background-color 0.15s ease, box-shadow 0.15s ease; }
.tt-journal__cat-head[tabindex]:focus { outline: none; }
.tt-journal__cat-head[tabindex]:focus-visible { background: #f5f7ff; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35); }
.tt-journal__cat-head.is-active, .tt-journal__cat-head.is-hl { background: #eef2ff; box-shadow: 0 2px 8px rgba(79, 70, 229, 0.16); }
.tt-table td, .tt-table th { font-size: 0.8125rem; vertical-align: middle; }
.tt-table__gap td { color: #6b7280; background: #fafafa; }
.tt-table__notes td { border-top: 0; padding-top: 0; }
.tt-notes { white-space: normal; overflow-wrap: anywhere; font-size: 0.8125rem; color: #374151; background: #fffdf5; border: 1px solid #fde68a; border-radius: 10px; padding: 0.4rem 0.7rem; margin: 0.25rem 0; }
.tt-notes-form { margin-top: 0.35rem; }
.tt-day__tz { margin-top: 0.4rem; }
.tt-journal { margin-top: 0.5rem; }
.tt-bar__seg--upcoming { background: #fff; }
/* Neighbouring slots (back to back when untracked time is hidden, or two slots of one
   activity) get a hairline so they never read as one. */
.tt-bar__seg--slot + .tt-bar__seg--slot { border-left: 1px solid #fff; box-sizing: border-box; }

/* --- Tooltips and highlights (tt-shared.js) ----------------------------------- */
/* Highlights are soft and rounded (Megg, Nov 14): no square outlines, no stripes.
   A lit segment rounds its corners and gets a soft white inner glow while the rest
   dim; legend items, chart rows and list rows get a tinted, rounded background and
   a soft shadow. Keyboard focus is a soft rounded ring. */
.tt-bar__seg { transition: opacity 0.15s ease, box-shadow 0.15s ease, border-radius 0.15s ease, filter 0.15s ease; }
.tt-bar__seg:focus { outline: none; }
.tt-viz--hl .tt-bar__seg:not(.is-hl) { opacity: 0.3; }
.tt-bar__seg.is-active, .tt-viz--slot .tt-bar__seg.is-hl { z-index: 2; border-radius: 6px; filter: saturate(1.15) brightness(1.04); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.9), inset 0 0 10px rgba(255, 255, 255, 0.45); }
.tt-bar__seg:focus-visible, .tt-viz--slot .tt-bar__seg:focus-visible { z-index: 3; border-radius: 6px; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px rgba(67, 56, 202, 0.85), 0 0 0 3px rgba(99, 102, 241, 0.25); }
.tt-chart__row[tabindex], .tt-totals__item[tabindex] { border-radius: 10px; transition: opacity 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease; }
.tt-totals__item[tabindex] { padding: 0.05rem 0.5rem; border-radius: 999px; }
.tt-chart__row[tabindex] { padding-left: 0.45rem; padding-right: 0.45rem; margin-left: -0.45rem; margin-right: -0.45rem; }
.tt-chart__row[tabindex]:focus, .tt-totals__item[tabindex]:focus { outline: none; }
.tt-chart__row[tabindex]:focus-visible, .tt-totals__item[tabindex]:focus-visible { background: #f5f7ff; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35); }
/* Lit (.is-hl, tt-shared.js): a hovered slot = its segment, its row in the list and
   its activity's legend item; a hovered legend item / category row / donut slice =
   all of its slots and chart parts. Unlit segments dim. */
.tt-chart__row.is-active, .tt-totals__item.is-active { background: #eef2ff; }
.tt-chart__row.is-hl, .tt-totals__item.is-hl { background: #eef2ff; box-shadow: 0 2px 8px rgba(79, 70, 229, 0.16); }
.tt-log__slot[data-tt-slot-row], .tt-log__row[data-tt-slot-row] { transition: box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
/* Calendar table rows: a tinted row with rounded ends. */
.tt-table { border-collapse: separate; border-spacing: 0; }
tr[data-tt-slot-row] > td { transition: background-color 0.15s ease; }
tr[data-tt-slot-row].is-hl > td { background: #eef2ff; border-top-color: transparent; }
tr[data-tt-slot-row].is-hl + tr > td { border-top-color: transparent; }
tr[data-tt-slot-row].is-hl > td:first-child { border-radius: 10px 0 0 10px; }
tr[data-tt-slot-row].is-hl > td:last-child { border-radius: 0 10px 10px 0; }
.tt-donut { position: relative; transition: box-shadow 0.15s ease; }
.tt-donut:focus { outline: none; }
.tt-donut:focus-visible { box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.3); }
.tt-viz--hl .tt-donut { box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12); }
.tt-donut__focus { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; }
.tt-donut__hole { position: relative; z-index: 1; }
.tt-tooltip { position: fixed; z-index: 1080; max-width: min(18rem, calc(100vw - 16px)); padding: 0.5rem 0.65rem; border-radius: 8px; background: #111827; color: #f9fafb; font-size: 0.8rem; line-height: 1.4; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22); pointer-events: none; overflow-wrap: anywhere; }
.tt-tooltip[hidden] { display: none; }
.tt-tooltip.is-pinned { pointer-events: auto; }
.tt-tooltip .tt-tip__head { display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.15rem; font-size: 0.85rem; }
.tt-tooltip .tt-tip__meta { color: #d1d5db; }
.tt-tooltip .tt-tip__meta strong { color: #fff; }
.tt-tooltip .tt-tip__notes { margin-top: 0.3rem; color: #fde68a; }
.tt-tooltip .tt-tip__badge { padding: 0 0.4rem; border-radius: 999px; background: #16a34a; color: #fff; font-size: 0.7rem; }
.tt-table__upcoming td { color: #9ca3af; }

/* --- Time Log single page ------------------------------------------------ */
.tt-daynav { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.tt-daynav__title { font-size: 1.1rem; font-weight: 600; }
.tt-daynav__pick { margin-left: auto; display: flex; gap: 0.25rem; }

.tt-clock-btn { width: auto; padding: 0 0.6rem; gap: 0.35rem; white-space: nowrap; }
.tt-clock-btn__label { font-size: 0.8rem; font-weight: 600; }
.tt-log__time { min-width: 7.5rem; font-variant-numeric: tabular-nums; color: #475569; margin-right: 0.75rem; }
.tt-log__slot .ayat-planner-item__head { align-items: flex-start; }
/* The day's list: each slot is a soft rounded card (no dividers, no stripes); the
   running one is green-tinted; untracked gaps and later today are dashed placeholders. */
.tt-log { display: flex; flex-direction: column; gap: 0.4rem; }
.tt-log__slot.ayat-planner-item { margin: 0; padding: 0.6rem 0.75rem; border: 1px solid #eef0f2; border-radius: 12px; background: #fff; }
.tt-log__slot.tt-item--running { background: #f0fdf4; border-color: #bbf7d0; }
.tt-log__row { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.75rem; font-size: 0.875rem; color: #64748b; border: 1px dashed #d5dbe3; border-radius: 12px; background: #fafbfc; margin: 0; }
.tt-log__row--upcoming { border-color: #e5e7eb; background: #fff; }
.tt-log .tt-log__slot.ayat-planner-item.is-hl, .tt-log .tt-log__row.is-hl { background: #eef2ff; border-color: #c7d2fe; box-shadow: 0 6px 16px rgba(79, 70, 229, 0.14); }
details.tt-panel > summary { cursor: pointer; list-style: none; }
details.tt-panel > summary::-webkit-details-marker { display: none; }
@media (max-width: 575px) {
  .tt-daynav__pick { margin-left: 0; }
  .tt-log__time { min-width: 0; display: block; }
  .tt-log__slot .ayat-planner-item__head { flex-wrap: wrap; }
  .tt-clock-btn__label { display: none; }
}

/* --- Journal picture of the day ----------------------------------------- */
.tt-journal__picture { display: flex; align-items: center; gap: 1.25rem; margin: 0.5rem 0 1rem; }
.tt-donut { flex: 0 0 auto; width: 120px; height: 120px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.tt-donut__hole { width: 72px; height: 72px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; text-align: center; }
.tt-donut__hole strong { font-size: 0.85rem; }
.tt-donut__hole small { font-size: 0.65rem; color: #64748b; }
.tt-chart { flex: 1 1 auto; min-width: 0; }
.tt-chart__row { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr) auto; align-items: center; gap: 0.5rem; font-size: 0.85rem; padding: 0.15rem 0; }
.tt-chart__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-chart__track { height: 0.55rem; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
.tt-chart__fill { display: block; height: 100%; border-radius: 999px; }
.tt-chart__fill--untracked { background: repeating-linear-gradient(45deg, #e2e8f0, #e2e8f0 4px, #f8fafc 4px, #f8fafc 8px); }
.tt-chart__value { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 575px) {
  .tt-journal__picture { flex-direction: column; align-items: stretch; }
  .tt-donut { align-self: center; }
  .tt-chart__row { grid-template-columns: minmax(0, 1fr) auto; }
  .tt-chart__track { grid-column: 1 / -1; grid-row: 2; }
}

/* --- Pending timezone switch ------------------------------------------- */
.tt-tz-pending { display: flex; gap: 0.75rem; padding: 0.85rem 1rem; margin-bottom: 1rem; border: 1px solid #c7d2fe; background: #eef2ff; border-radius: 0.75rem; color: #1e1b4b; }
.tt-tz-pending__icon { font-size: 1.25rem; color: #4f46e5; padding-top: 0.1rem; }
.tt-tz-pending__title { display: block; margin-bottom: 0.25rem; }
.tt-tz-pending__countdown { font-weight: 700; font-variant-numeric: tabular-nums; }

/* --- Free-plan allowance ----------------------------------------------- */
.tt-allowance { padding: 0.85rem 1rem; margin-bottom: 1rem; border: 1px solid #fde68a; background: #fffbeb; border-radius: 0.75rem; color: #78350f; }
.tt-allowance--reached { border-color: #fecaca; background: #fef2f2; color: #7f1d1d; }
/* At the cap the prompt can't be closed and stays pinned while you scroll. */
.tt-allowance--reached { position: sticky; top: 0.5rem; z-index: 30; border-width: 2px; box-shadow: 0 10px 30px rgba(127, 29, 29, 0.18); }
.tt-allowance--dismissible { position: relative; padding-right: 2.75rem; }
.tt-allowance__close-form { position: absolute; top: 0.35rem; right: 0.4rem; margin: 0; }
.tt-allowance__close { width: 2rem; height: 2rem; border: 0; border-radius: 999px; background: transparent; color: #92400e; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.tt-allowance__close:hover, .tt-allowance__close:focus { background: rgba(146, 64, 14, 0.12); outline: none; }
.tt-allowance__close:focus-visible { box-shadow: 0 0 0 2px #f59e0b; }
.tt-allowance__title { display: block; margin-bottom: 0.25rem; }
.tt-allowance__countdown { font-weight: 700; font-variant-numeric: tabular-nums; }

/* --- Journal: collapsed per-activity breakdown -------------------------- */
.tt-journal__breakdown { margin-top: 1rem; border-top: 1px solid #e5e7eb; padding-top: 0.75rem; }
.tt-journal__breakdown-toggle { cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; font-weight: 600; list-style: none; }
.tt-journal__breakdown-toggle::-webkit-details-marker { display: none; }
.tt-journal__breakdown-toggle::before { content: '\25B8'; display: inline-block; transition: transform 0.15s ease; color: #6b7280; }
.tt-journal__breakdown[open] > .tt-journal__breakdown-toggle::before { transform: rotate(90deg); }
.tt-journal__breakdown-body { margin-top: 0.75rem; }
.tt-journal__cat-title { font-size: 0.95rem; margin: 0.5rem 0 0.35rem; }


/* --- The schedule (one list, the same every day) ------------------------ */
.tt-schedule__when { font-size: 0.8rem; color: #6b7280; }

.tt-schedule__cats { display: flex; flex-direction: column; gap: 0.9rem; }
.tt-cat { border: 1px solid #eef0f2; border-radius: 14px; background: #fff; padding: 0 0 0.35rem 0; }
/* The category's color tints its head (the swatch shows the color itself); no side stripe. */
.tt-cat > .tt-cat__head { background: #f9fafb; background: color-mix(in srgb, var(--tt-cat-color, #64748b) 9%, #fff); border-radius: 13px 13px 0 0; padding-top: 0.35rem; padding-bottom: 0.35rem; margin-bottom: 0.15rem; }
.tt-cat__head { display: flex; align-items: center; gap: 0.4rem; padding: 0.2rem 0.25rem 0.2rem 0.15rem; }
.tt-cat__form, .tt-act__form { display: flex; align-items: center; gap: 0.4rem; flex: 1 1 auto; min-width: 0; margin: 0; }
.tt-cat__color { flex: 0 0 auto; width: 1.4rem; height: 1.4rem; padding: 0; border: 0; border-radius: 0.35rem; background: transparent; cursor: pointer; }
.tt-cat__color::-webkit-color-swatch-wrapper { padding: 0; }
.tt-cat__color::-webkit-color-swatch { border: 0; border-radius: 0.35rem; }
.tt-cat__color::-moz-color-swatch { border: 0; border-radius: 0.35rem; }
.tt-cat__name { font-size: 1rem; font-weight: 700; color: #111827; }
.tt-cat__name--static { margin: 0; flex: 1 1 auto; padding: 0.2rem 0.35rem; }
.tt-cat__total { flex: 0 0 auto; font-size: 0.8rem; font-weight: 600; color: #4b5563; font-variant-numeric: tabular-nums; }

/* Names are inputs that look like text until you hover or focus them. */
.tt-inline-input { flex: 1 1 auto; min-width: 0; width: 100%; padding: 0.2rem 0.35rem; border: 1px solid transparent; border-radius: 6px; background: transparent; font: inherit; color: inherit; }
/* The theme sets `input { font: ... !important }`, so the sizes and weights here need !important too. */
.tt-inline-input.tt-cat__name { font-size: 1rem !important; font-weight: 700 !important; color: #111827; }
.tt-inline-input.tt-act__name { font-size: 0.925rem !important; }
.tt-act--running .tt-inline-input.tt-act__name { font-weight: 700 !important; }
.tt-inline-input:hover { border-color: #e5e7eb; }
.tt-inline-input:focus { border-color: #818cf8; background: #fff; outline: none; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2); }
.tt-inline-input.is-saving { opacity: 0.6; }
.tt-inline-input.is-saved { background: #ecfdf5; transition: background 0.4s ease; }

.tt-cat__activities { list-style: none; margin: 0; padding: 0; }
.tt-act { display: flex; align-items: center; gap: 0.4rem; min-height: 2.6rem; padding: 0.15rem 0.25rem 0.15rem 1.1rem; border-top: 1px solid #f3f4f6; }
.tt-act:first-child { border-top-color: transparent; }
.tt-act--running { background: #f0fdf4; border-radius: 10px; border-top-color: transparent; }
.tt-act--running + .tt-act { border-top-color: transparent; }
.tt-act--running .tt-act__name { font-weight: 700; }
.tt-act__name { font-size: 0.925rem; }
.tt-act__time { flex: 0 0 auto; min-width: 3.5rem; text-align: right; font-size: 0.8rem; color: #4b5563; font-variant-numeric: tabular-nums; }
.tt-clock-form, .tt-remove-form { margin: 0; flex: 0 0 auto; }

.tt-handle { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 2rem; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #c0c4cc; cursor: grab; touch-action: none; }
.tt-handle:hover { color: #6b7280; background: #f3f4f6; }
.tt-handle:focus-visible { outline: none; color: #4f46e5; box-shadow: 0 0 0 2px #818cf8; }
.tt-handle[aria-pressed="true"] { color: #fff; background: #4f46e5; }
.tt-handle--placeholder { cursor: default; }
.tt-is-dragging, .tt-is-dragging * { cursor: grabbing !important; user-select: none; }
.tt-act.is-dragging, .tt-cat.is-dragging, .tt-act.is-grabbed, .tt-cat.is-grabbed { position: relative; z-index: 2; background: #fff; box-shadow: 0 6px 18px rgba(17, 24, 39, 0.14); border-radius: 8px; }
.tt-act.is-grabbed, .tt-cat.is-grabbed { outline: 2px dashed #818cf8; outline-offset: 1px; }

.tt-remove { display: inline-flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem; padding: 0; border: 0; border-radius: 999px; background: transparent; color: #c0c4cc; cursor: pointer; }
.tt-remove:hover, .tt-remove:focus-visible { color: #dc2626; background: #fef2f2; outline: none; }
@media (hover: hover) {
  .tt-act .tt-remove, .tt-cat__head .tt-remove { opacity: 0; }
  .tt-act:hover .tt-remove, .tt-act:focus-within .tt-remove,
  .tt-cat__head:hover .tt-remove, .tt-cat__head:focus-within .tt-remove { opacity: 1; }
}

.tt-add { display: flex; align-items: center; gap: 0.4rem; margin: 0; padding: 0.2rem 0.25rem 0 1.1rem; }
.tt-add__icon { flex: 0 0 1.5rem; text-align: center; font-size: 0.75rem; color: #9ca3af; }
.tt-add__input { font-size: 0.9rem; color: #374151; }
.tt-add__input::placeholder { color: #9ca3af; }
.tt-add__btn { flex: 0 0 auto; }
/* The Add button only shows once you start typing (Enter works too). */
.tt-add__input:placeholder-shown + .tt-add__btn { display: none; }
.tt-add--category { margin-top: 1rem; padding: 0.6rem 0.5rem; border: 1px dashed #c7d2fe; border-radius: 10px; }
.tt-add--category .tt-add__input { font-weight: 600 !important; }
.tt-add--category .tt-add__icon { color: #6366f1; }

.tt-schedule__empty { margin-bottom: 0.5rem; }

@media (max-width: 575px) {
  .tt-act { padding-left: 0.25rem; gap: 0.25rem; }
  .tt-add { padding-left: 0.25rem; }
  .tt-act__time { min-width: 0; }
}

/* ---------- Intro bubble (closable, reopened from "About & templates") ---------- */
.tt-intro { position: relative; padding: 1.1rem 3rem 1.1rem 1.2rem; background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 1rem; color: #312e81; box-shadow: 0 6px 18px rgba(79, 70, 229, 0.08); }
.tt-intro[hidden] { display: none; }
/* The speech-bubble tail, pointing down at the page below. */
.tt-intro::after { content: ""; position: absolute; left: 2rem; bottom: -9px; width: 16px; height: 16px; background: #eef2ff; border-right: 1px solid #c7d2fe; border-bottom: 1px solid #c7d2fe; transform: rotate(45deg); }
.tt-intro__close-form { position: absolute; top: 0.45rem; right: 0.5rem; margin: 0; }
.tt-intro__close { width: 2.1rem; height: 2.1rem; border: 0; border-radius: 999px; background: transparent; color: #4338ca; font-size: 1.45rem; line-height: 1; cursor: pointer; }
.tt-intro__close:hover, .tt-intro__close:focus-visible { background: rgba(67, 56, 202, 0.12); outline: none; }
.tt-intro__title { font-size: 1.05rem; font-weight: 700; color: #1e1b4b; margin: 0 0 0.35rem; outline: none; }
.tt-intro__title .fa { color: #4f46e5; margin-right: 0.3rem; }
.tt-intro__lead { font-size: 0.9rem; margin: 0 0 0.6rem; }
.tt-intro__more { margin: 0 0 0.75rem; }
.tt-intro__more-summary { display: inline-flex; align-items: center; gap: 0.4rem; list-style: none; cursor: pointer; font-size: 0.86rem; font-weight: 600; color: #4338ca; padding: 0.3rem 0.7rem; min-height: 2.25rem; border: 1px solid #c7d2fe; border-radius: 999px; background: #eef2ff; user-select: none; }
.tt-intro__more-summary::-webkit-details-marker { display: none; }
.tt-intro__more-summary::marker { content: ''; }
.tt-intro__more-summary:hover, .tt-intro__more-summary:focus-visible { background: #e0e7ff; outline: 2px solid #a5b4fc; outline-offset: 1px; }
.tt-intro__more-icon { font-size: 0.72rem; transition: transform 0.15s ease; }
.tt-intro__more[open] > .tt-intro__more-summary .tt-intro__more-icon { transform: rotate(90deg); }
.tt-intro__more[open] > .tt-intro__features { margin-top: 0.65rem; }
@media (prefers-reduced-motion: reduce) { .tt-intro__more-icon { transition: none; } }
.tt-intro__features { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0.45rem 1.25rem; font-size: 0.86rem; }
.tt-intro__features li { display: flex; gap: 0.55rem; align-items: flex-start; }
.tt-intro__features .fa { color: #6366f1; width: 1.1rem; text-align: center; padding-top: 0.2rem; flex: 0 0 auto; }
.tt-intro__defaults { font-size: 0.9rem; margin: 0 0 0.75rem; padding-top: 0.65rem; border-top: 1px solid #c7d2fe; }
.tt-intro-open-form { margin: 0 0 0 auto; }
.tt-intro-open { border: 1px solid #c7d2fe; background: #eef2ff; color: #4338ca; border-radius: 999px; font-size: 0.78rem; font-weight: 600; padding: 0.2rem 0.65rem; cursor: pointer; margin-right: 0.6rem; }
.tt-intro-open:hover, .tt-intro-open:focus-visible { background: #e0e7ff; outline: 2px solid #a5b4fc; outline-offset: 1px; }
.tt-intro-open[hidden] { display: none; }

/* ---------- Template picker (bubble and empty schedule) ---------- */
.tt-picker { margin: 0; }
.tt-picker__label { display: block; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: #4338ca; margin-bottom: 0.3rem; }
.tt-picker__row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.tt-picker__select { width: auto; min-width: 15rem; max-width: 100%; flex: 0 1 auto; }
.tt-picker__previews { margin-top: 0.55rem; }
.tt-picker__preview[hidden] { display: none; }
.tt-picker__desc { font-size: 0.85rem; margin: 0 0 0.3rem; color: inherit; opacity: 0.9; }
.tt-picker__cats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.2rem 1rem; font-size: 0.82rem; }
.tt-picker__cats strong { margin-right: 0.25rem; }
.tt-picker__cats strong::after { content: ":"; }
.tt-schedule__empty .tt-picker { text-align: left; max-width: 640px; margin: 0.75rem auto 0; }
.tt-schedule__empty .tt-picker__label { color: #374151; }

@media (max-width: 575.98px) {
  .tt-intro { padding: 0.95rem 2.6rem 0.95rem 0.95rem; }
  .tt-picker__select { min-width: 0; width: 100%; flex-basis: 100%; }
  .tt-picker__row .btn { flex: 1 1 auto; }
}

/* ---------- Empty schedule: build from scratch ---------- */
.tt-picker__or { font-size: 0.85rem; color: #6b7280; }
.tt-schedule__empty-picker[hidden] { display: none; }
/* The first "Add category" box is obvious: solid border, button always shown. */
.tt-add--first { border: 2px solid #a5b4fc; background: #f5f7ff; }
.tt-add--first:focus-within { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18); }
.tt-add--first .tt-add__btn { display: inline-block !important; }
/* First box: the visible label names the step; the placeholder lists examples. */
.tt-add--first { flex-wrap: wrap; row-gap: 0.25rem; }
.tt-add__label { flex: 0 0 100%; order: -1; margin: 0 0 0 1.9rem; font-size: 0.8rem; font-weight: 700; color: #4338ca; }
.tt-add--first .tt-add__input { flex: 1 1 12rem; min-width: 0; }
@media (max-width: 575.98px) {
  .tt-add--first .tt-add__btn { flex: 1 0 100%; }
}
@media (max-width: 575.98px) {
  .tt-picker__or { display: none; }
}

/* Inline form errors (e.g. an overlapping time slot). They stay until dismissed or the form is sent again. */
.tt-form-error {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin: 0.5rem 0;
	padding: 0.55rem 0.75rem;
	border: 1px solid #f1aeb5;
	border-radius: 10px;
	background: #fdecee;
	color: #842029;
	font-size: 0.9rem;
	line-height: 1.35;
}
.tt-form-error__icon {
	flex: 0 0 auto;
	margin-top: 0.15rem;
}
.tt-form-error__text {
	flex: 1 1 auto;
	min-width: 0;
	overflow-wrap: anywhere;
}
.tt-form-error__close {
	flex: 0 0 auto;
	min-width: 2rem;
	min-height: 2rem;
	margin: -0.35rem -0.4rem -0.35rem 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	border-radius: 0.25rem;
}
.tt-form-error__close:hover,
.tt-form-error__close:focus-visible {
	background: rgba(132, 32, 41, 0.1);
}
/* As a row in the activity list (the schedule is a flex list). */
li.tt-form-error--row {
	list-style: none;
	flex-basis: 100%;
	width: 100%;
}
form[aria-busy="true"] {
	opacity: 0.7;
}

/* Notes are collapsed: a sticky note marks a slot that has them, the row opens them. */
.tt-notes-icon { color: #d97706; font-size: 0.85em; margin-left: 0.15rem; }
.tt-table__row--notes { cursor: pointer; }
.tt-table__row--notes:hover > td { background: #fafaf5; }
.tt-table__row--notes.is-open > td { background: #fffbeb; }
.tt-notes-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.15rem 0.25rem;
	margin: -0.15rem -0.25rem;
	border: 0;
	border-radius: 0.25rem;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
	min-height: 32px;
}
.tt-notes-toggle:focus-visible { outline: 2px solid #2563eb; outline-offset: 1px; }
.tt-notes-toggle::after {
	content: "";
	width: 0.45rem;
	height: 0.45rem;
	margin-left: 0.15rem;
	border-right: 2px solid #9ca3af;
	border-bottom: 2px solid #9ca3af;
	transform: rotate(45deg) translateY(-2px);
	transition: transform 0.15s ease;
}
.tt-notes-toggle[aria-expanded="true"]::after { transform: rotate(225deg) translateY(-2px); }
.tt-table__notes > td { background: #fffbeb; }

/* Save buttons of forms that save on change are only for no-JS. */
.tt-js [data-tt-autosave-button] { display: none; }

/* This day's journal visibility (top of the Settings panel). */
.tt-settings-form__group.tt-dayvis { padding-bottom: 0.9rem; border-bottom: 1px solid #e5e7eb; scroll-margin-top: 5rem; }
.tt-dayvis__title { font-size: 0.9rem; }
.tt-dayvis__date { font-weight: 400; color: #6b7280; }
.tt-dayvis__form { margin-bottom: 0.35rem; }
.tt-vis-help { font-size: 0.75rem; }

/* Settings panel */
/* The day's timezone, with a button to the profile field that sets it. */
.tt-zone-row { margin-bottom: 0; }
.tt-zone-row__body { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.tt-zone-row__text { flex: 1 1 18rem; min-width: 0; }
.tt-zone-row__btn { flex: 0 0 auto; }
@media (max-width: 575.98px) {
	.tt-zone-row__btn { flex: 1 1 100%; }
}
.tt-settings-form__group { margin: 0 0 0.9rem; padding: 0; border: 0; }
.tt-settings-form__divider { border: 0; border-top: 1px solid #e5e7eb; margin: 0 0 0.9rem; }
.tt-vis-help strong { color: #374151; }
/* Settings page: the Time Log card. */
.tt-settings-card__subtitle { font-size: 0.95rem; font-weight: 600; margin: 0 0 0.6rem; }
.tt-settings-card__group { scroll-margin-top: 5rem; }
.tt-settings-card__group .tt-vis-help { margin-top: 0.25rem; line-height: 1.5; }
.tt-settings-card__group + .tt-settings-form__divider { margin: 1rem 0; }
.tt-settings-card__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 0.75rem; }
#time-log-settings { scroll-margin-top: 5rem; }
.tt-settings-form__legend { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.4rem; }
.tt-settings-form__row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; margin-bottom: 0.4rem; }
.tt-settings-form__row label { margin: 0; min-width: 11rem; font-size: 0.875rem; }
.tt-settings-form__row select { width: auto; min-width: 9rem; }
.tt-quick-status { font-size: 0.8125rem; color: #047857; margin-top: 0.3rem; }
@media (max-width: 575.98px) {
	.tt-settings-form__row label { min-width: 0; flex: 1 1 100%; }
	.tt-settings-form__row select { flex: 1 1 100%; }
}

/* Live numbers while clocked in (tt-shared.js): fixed-width digits so a ticking
   total doesn't make the legend jiggle. */
[data-tt-tick] {
	font-variant-numeric: tabular-nums;
}
