/* Shared proportions and interaction states. Each appearance keeps its palette and artwork. */
body {
  --ui-radius: 18px;
  --ui-gap: 20px;
  --ui-padding: clamp(18px, 2.2vw, 28px);
  --ui-shadow: 0 6px 24px color-mix(in srgb, var(--bg) 24%, transparent);
}
body[data-style] .content { max-width: 1280px; padding-top: 28px; }
body[data-style] .content :where(h1,h2,h3,h4) { text-wrap: pretty; overflow-wrap: anywhere; }
body[data-style] .content :where(h1) { font-size: clamp(25px, 2.6vw, 34px); line-height: 1.35; letter-spacing: -.025em; }
body[data-style] .content :where(h2) { font-size: 20px; line-height: 1.45; }
body[data-style] .content :where(h3) { font-size: 17px; line-height: 1.5; }
.content :where(p,small,.muted,.hint) { overflow-wrap: anywhere; }
.content :where(.card,.panel,.slim-tool,.data-section,.cog-library-section) { border-radius: var(--ui-radius); border-color: var(--line); }
.content > .card { padding: var(--ui-padding); }
.content :where(.panel-head,.section-head,.planning-workspace-head,.home-agenda-head) { gap: 14px; }
.content :where(.panel-head h2,.section-head h2,.home-agenda-head h2) { margin: 0; }
.content :where(.inline-actions,.form-actions) { flex-wrap: wrap; gap: 8px; }
.content :where(.card,.panel,.grid,.grid-2,.grid-3,.data-workspace,.data-workspace-main) { min-width: 0; }

/* Navigation stays calm while the current destination is unmistakable. */
@media(min-width: 901px) {
  body[data-style] { --sidebar: 216px; }
  body[data-style] .sidebar { padding: 28px 16px 20px; }
  .sidebar .brand { margin-bottom: 20px; }
  .sidebar .nav-btn { padding: 13px 14px; border-radius: 12px; margin-bottom: 6px; }
  .sidebar .nav-btn small { font-size: 12px; line-height: 1.55; }
  .sidebar .nav-btn.active { box-shadow: inset 3px 0 0 var(--accent); }
  .sidebar .sidebar-foot { font-size: 12px; line-height: 1.7; }
}
body[data-style] .topbar { border-bottom-color: color-mix(in srgb,var(--line) 70%,transparent); }
.save-status { min-width: 0; max-width: 100%; }
#saveText,[data-sync-result] { overflow-wrap: anywhere; }
.btn { transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease; }
body[data-style] .btn { border-radius: 10px; font-family: var(--sp-sans,system-ui); }
body[data-style] .btn.primary { font-weight: 650; }
.btn:disabled,button:disabled { cursor: not-allowed; }
body[data-style] :is(button,a,input,select,textarea,summary):focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
body[data-style] .btn.icon-btn { min-width: 44px; min-height: 44px; }

/* One full-width rhythm, with body/mind cards using the space actually available. */
.home-widget-grid { gap: var(--ui-gap); }
body[data-style] .home-modular .home-widget-content > :is(section,.card,details) { border-radius: var(--ui-radius); }
body[data-style] .home-modular :is(.home-now,.home-records,.home-agenda,.home-life-records) { padding: var(--ui-padding); }
body[data-style] .home-modular .home-now { border: 1px solid color-mix(in srgb,var(--accent-2) 35%,var(--line)); box-shadow: var(--ui-shadow); }
body[data-style] .home-modular .home-records { grid-template-columns: minmax(0,1fr); }
body[data-style] .home-modular .home-records .daily-checkin-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; width: 100%; max-width: none; }
body[data-style] .home-modular .home-records .state-card { width: 100%; min-width: 0; height: auto; min-height: 154px; padding: 18px; border-radius: 14px; background: color-mix(in srgb,var(--panel-2) 44%,var(--panel)); }
body[data-style] .home-modular .home-records .daily-checkin-dock { height: auto; min-height: 0; }
body[data-style] .home-modular .home-records .state-card-chips { flex-wrap: wrap; }
body[data-style] .home-modular .home-agenda { box-shadow: none; }
.home-agenda-head { margin-bottom: 12px; }
.home-agenda-tabs { margin-bottom: 14px; }
.home-modular .home-quick-grid { gap: 10px; }
.home-modular .home-quick-card { border-radius: 12px; }
body[data-style] .slim-capture .capture-input { padding: 16px 18px; border-radius: 12px; background: color-mix(in srgb,var(--bg) 85%,var(--panel)); line-height: 1.7; }
.slim-capture .capture-tools { padding-top: 4px; }
.slim-capture .capture-tools-help-body { max-width: 100%; }
.slim-capture .capture-tools-help-body p { max-width: 64ch; }

/* Forms share labels, comfortable inputs, and a footer that remains reachable. */
body[data-style] .modal { border-radius: 22px; display: flex; flex-direction: column; max-height: min(880px,calc(100dvh - 48px)); overflow: hidden; }
body[data-style] .modal-head { flex: 0 0 auto; padding: 20px 24px; align-items: center; gap: 16px; }
body[data-style] .modal-head h3 { margin: 0; font-size: 20px; line-height: 1.45; }
body[data-style] .modal-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px; scrollbar-gutter: stable; }
body[data-style] .modal-actions { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 24px; background: var(--panel); }
.modal-actions:empty { display: none; }
.modal :where(form,.form-grid,.form-row,.field-wrap,.form-group) { min-width: 0; max-width: 100%; }
body[data-style] :is(.modal,.content) :where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),textarea,select,.field) {
  min-width: 0; max-width: 100%; border-radius: 10px; border-color: var(--line); line-height: 1.5;
}
body[data-style] .modal :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,.field) { min-height: 46px; }
.modal :where(label,.field-label) { line-height: 1.6; }
.modal :where(textarea) { resize: vertical; }
.modal :where(.hint,.muted,small) { line-height: 1.65; overflow-wrap: anywhere; }
.modal :where(details) > summary { min-height: 44px; padding-block: 12px; cursor: pointer; }
.modal [role=alert],.modal [role=status] { overflow-wrap: anywhere; }

/* Lists, review charts, settings and advanced tools use the same surface language. */
.content :where(.lean-task,.review-history-row,.data-action,.data-workspace-link,.cog-library-card,.outcome-manager-row) { border-radius: 12px; }
.content :where(.lean-task-title,.task-title,.data-action strong,.outcome-manager-main b) { line-height: 1.6; overflow-wrap: anywhere; }
.content :where(.task-meta,.lean-task-meta) { line-height: 1.65; gap: 6px; }
.content :where(.segmented,.calendar-filter,.sort-toolbar) { padding: 4px; gap: 4px; border-radius: 12px; }
.content :where(.seg-btn,.sort-chip,.calendar-filter button) { border-radius: 8px; }
.content :where(.table-wrap) { border: 1px solid var(--line); border-radius: 14px; }
.content :where(.table-wrap th,.table-wrap td) { padding: 12px 14px; }
.content :where(.empty,.time-empty,.outcome-manager-empty,.widget-empty,.cog-library-empty,.trajectory-nav-empty) { line-height: 1.8; }
.content :where(.time-empty,.outcome-manager-empty,.cog-library-empty,.trajectory-nav-empty) { padding: 28px 22px; border: 1px dashed var(--line); border-radius: 14px; background: color-mix(in srgb,var(--panel) 68%,var(--bg)); }
.slim-tool-grid { gap: 20px; }
.slim-tool { position: relative; border: 1px solid var(--line); box-shadow: var(--ui-shadow); }
.slim-tool h2 { margin-bottom: 10px; }
.slim-tool > .btn { margin-top: 12px; }
.slim-more-tools { border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; }
.slim-more-tools > summary { min-height: 44px; cursor: pointer; color: var(--muted); }
.content :where(.display-settings,.currency-settings,.pilot-guide-settings) { padding: var(--ui-padding); }
.content :where(.display-settings,.currency-settings,.pilot-guide-settings,.review-resource-card,.weekly-compare-card) { border-radius: var(--ui-radius); }
.content :where(.chart,.chart-wrap,.review-chart,.review-resource-grid,.journal-head,.gt-workspace) { min-width: 0; max-width: 100%; }
.content :where(.journal-head,.calendar-toolbar,.review-resource-head) { gap: 14px; flex-wrap: wrap; }
.content :where(.data-action) { padding: 18px; }
.content :where(.data-action span,.data-workspace-link small) { line-height: 1.65; }
.storage-notice { display: flex; align-items: center; gap: 16px; margin: 16px 28px 0; padding: 14px 18px; border: 1px solid color-mix(in srgb,var(--warn) 50%,var(--line)); border-radius: 14px; background: color-mix(in srgb,var(--warn) 8%,var(--panel)); }
.storage-notice[hidden] { display: none; }
.storage-notice > div { flex: 1; min-width: 0; }
.storage-notice strong { font-size: 14px; }
.storage-notice p { margin: 4px 0 0; font-size: 13px; color: var(--muted); line-height: 1.65; }
.storage-notice .btn { flex-shrink: 0; }
body[data-style] .toast { max-width: min(560px,calc(100vw - 32px)); border-radius: 14px; line-height: 1.65; overflow-wrap: anywhere; }
@media(hover:hover) {
  .content :where(.data-action,.slim-tool,.cog-library-card):hover { border-color: color-mix(in srgb,var(--accent-2) 48%,var(--line)); }
}
@container home-widget (max-width: 420px) {
  body[data-style] .home-modular .home-records .daily-checkin-grid { grid-template-columns: minmax(0,1fr); }
  body[data-style] .home-modular .home-records .state-card { min-height: 132px; }
}
@media(max-width: 760px) {
  body { --ui-gap: 14px; --ui-padding: 18px; --ui-radius: 16px; }
  body[data-style] .content { padding-top: 20px!important; }
  body[data-style] .content h1 { font-size: 26px; }
  body[data-style] .content h2 { font-size: 19px; }
  body[data-style] .content .btn,body[data-style] .modal .btn { min-height: 44px; }
  body[data-style] .modal { width: 100%; max-height: calc(100dvh - 12px); border-radius: 20px 20px 0 0; }
  body[data-style] .modal-head { padding: 16px 18px; }
  body[data-style] .modal-body { padding: 20px 18px; }
  body[data-style] .modal-actions { padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); }
  body[data-style] .modal :is(input,select,textarea,.field) { font-size: 16px; }
  .modal-actions .btn { flex: 1 1 auto; white-space: normal; }
  .storage-notice { margin: 12px 16px 0; padding: 14px; flex-wrap: wrap; gap: 10px; }
  .storage-notice > div { flex-basis: 100%; }
  .slim-tool { padding: 22px; }
  .slim-more-tools { padding: 12px 16px; }
  .content :where(.table-wrap th,.table-wrap td) { padding: 10px; }
}
@media(prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto!important; transition-duration: .01ms!important; animation-duration: .01ms!important; animation-iteration-count: 1!important; }
}

/* Six choices form balanced rows instead of a 4 + 2 remainder. */
body[data-style] .theme-choice { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
body[data-style] .theme-choice > button { border-radius: 12px; padding: 16px; min-width: 0; min-height: 88px; }
body[data-style] .theme-choice > button :is(b,small,span) { overflow-wrap: anywhere; }
@media(max-width:760px) { body[data-style] .theme-choice { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; } body[data-style] .theme-choice > button { padding: 12px; } }
@media(max-width:360px) { body[data-style] .theme-choice { grid-template-columns: minmax(0,1fr); } }

/* A compact timer pill, with refresh anchored at the right edge. */
body[data-style] .app .topbar .top-actions #refreshAppBtn { order: 90; flex: 0 0 auto; margin-left: 0; }
body[data-style] .app .topbar .top-actions .mobile-utility-btn { order: 80; }
body[data-style] .app .topbar .top-actions #globalTimerBtn {
  display: grid!important; grid-template-columns: minmax(0,1fr) auto; align-items: center; align-content: center;
  justify-items: start; gap: 12px; flex: 0 1 auto; width: fit-content; min-width: 0; max-width: 240px;
  min-height: 44px; height: 44px; padding: 8px 14px; border-radius: 999px; overflow: hidden;
  border: 1px solid var(--line); background: color-mix(in srgb,var(--panel) 88%,var(--bg)); color: var(--text);
  box-shadow: none; text-align: left; white-space: nowrap;
}
body[data-style] .app .topbar .top-actions #globalTimerBtn:not(.is-running) { grid-template-columns: minmax(0,1fr); }
body[data-style] .app .topbar .top-actions #globalTimerBtn.is-running {
  border-color: color-mix(in srgb,var(--accent-2) 35%,var(--line)); background: color-mix(in srgb,var(--accent-2) 6%,var(--panel));
}
body[data-style] .app .topbar .top-actions #globalTimerBtn.timer-pending { border-color: var(--warn); }
body[data-style] .app .topbar .top-actions #globalTimerBtn .global-timer-name {
  display: block; width: auto; min-width: 0; max-width: 100%; font: 500 13px/1.5 var(--sp-sans,system-ui);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal;
}
body[data-style] .app .topbar .top-actions #globalTimerBtn.is-running .global-timer-name:before {
  content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%;
  background: var(--accent-2); vertical-align: 2px;
}
body[data-style] .app .topbar .top-actions #globalTimerBtn.timer-pending .global-timer-name:before { background: var(--warn); }
body[data-style] .app .topbar .top-actions #globalTimerBtn .global-timer-clock {
  display: block; width: max-content; min-width: max-content; padding-left: 12px; border-left: 1px solid var(--line);
  font: 500 13px/1.5 var(--sp-mono,monospace); font-variant-numeric: tabular-nums; color: var(--accent-2);
  white-space: nowrap; overflow: visible;
}
body[data-style] .app .topbar .top-actions #globalTimerBtn .global-timer-clock:before { display: none; }
body[data-style] .app .topbar .top-actions #globalTimerBtn .global-timer-clock[hidden] { display: none!important; }
@media(max-width:760px) {
  body[data-style] .app .topbar { display: flex; flex-wrap: nowrap; gap: 8px; }
  body[data-style] .app .topbar .topbar-left { flex: 0 0 auto; }
  body[data-style] .app .topbar .top-actions { display: flex; align-items: center; flex: 1 1 auto; min-width: 0; gap: 6px; }
  body[data-style] .app .topbar .top-actions #globalTimerBtn { flex: 0 1 auto; width: clamp(172px,54vw,224px); margin-inline: auto; max-width: 224px; gap: 8px; padding: 8px 12px; order: 0; }
  body[data-style] .app .topbar .top-actions #globalTimerBtn:not(.is-running) { width: clamp(120px,34vw,144px); justify-items: center; }
  body[data-style] .app .topbar .top-actions #globalTimerBtn .global-timer-clock { padding-left: 8px; font-size: 13px; }
  body[data-style] .app .topbar .top-actions #globalTimerBtn .global-timer-name { font-size: 13px; }
  body[data-style] .app .topbar .top-actions #refreshAppBtn {
    display: inline-flex!important; align-items: center; justify-content: center; order: 90;
    flex: 0 0 44px!important; width: 44px!important; min-width: 44px!important; height: 44px; min-height: 44px;
    margin: 0; padding: 0!important; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted);
  }
  body[data-style] .app .topbar .top-actions #refreshAppBtn .refresh-label { display: none; }
  body[data-style] .app .topbar .top-actions #refreshAppBtn .refresh-glyph { font-size: 20px; }
  body[data-style] .app .topbar .top-actions .mobile-utility-btn { flex: 0 0 36px; width: 36px; min-width: 36px; padding: 0; border-color: transparent; background: transparent; }
}

@media(max-width:360px) {
  body[data-style] .app .topbar .top-actions #globalTimerBtn.is-running { grid-template-columns: auto; justify-items: center; width: clamp(136px,46vw,172px); gap: 0; }
  body[data-style] .app .topbar .top-actions #globalTimerBtn.is-running .global-timer-name { display: none; }
  body[data-style] .app .topbar .top-actions #globalTimerBtn.is-running .global-timer-clock { padding-left: 0; border-left: 0; }
  body[data-style] .app .topbar .top-actions #globalTimerBtn.is-running .global-timer-clock:before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--accent-2); vertical-align: 2px; }
  body[data-style] .app .topbar .top-actions #globalTimerBtn.timer-pending .global-timer-clock:before { background: var(--warn); }
}

/* Keep download feedback clear of the timer rescue actions on a phone. */
@media(max-width:760px){body:has(#modal.open [data-timer-storage-dialog]) #toast{bottom:auto;top:calc(env(safe-area-inset-top,0px) + 12px);max-width:calc(100vw - 28px)}}

.session-start-at{display:block;grid-column:1/-1;color:var(--muted);font-variant-numeric:tabular-nums}.top-stop-timer[hidden]{display:none!important}.top-stop-timer{white-space:nowrap}
.event-comparison>small{display:block;margin-top:.7rem;color:var(--muted)}.event-comparison-row{display:grid;grid-template-columns:minmax(8rem,1fr) repeat(3,minmax(5rem,auto));align-items:baseline;gap:.6rem;padding:.65rem 0;border-block-end:1px solid var(--line);font-variant-numeric:tabular-nums}.event-comparison-row b{overflow-wrap:anywhere}.event-comparison-row em{color:var(--accent-2);font-style:normal}.event-comparison-row span{color:var(--muted)}
@media(max-width:760px){.top-stop-timer{display:none!important}.event-comparison-row{display:flex;flex-wrap:wrap;gap:.3rem .9rem}.event-comparison-row b{flex-basis:100%}}

/* Completion stays beside continuation; four actions remain balanced on small screens. */
body[data-style] .app .home-now > .flow-continuation .flow-continuation-actions { flex-wrap: wrap; }
body[data-style] .app .now-actions.has-task-completion { flex-wrap: wrap; }
@media (max-width: 640px) {
  body[data-style] .app .home-now > .flow-continuation .flow-continuation-actions,
  body[data-style] .app .now-actions.has-task-completion {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%;
  }
  body[data-style] .app .home-now > .flow-continuation .flow-continuation-actions .btn,
  body[data-style] .app .now-actions.has-task-completion .btn { min-width: 0; width: 100%; margin: 0; }
}

/* Typography, first pass: shared reading scale for the home and persistent timer. */
body[data-style] {
  --ui-reading-font: -apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI Variable Text","Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Noto Sans CJK SC","Microsoft YaHei",system-ui,sans-serif;
  --ui-type-title: 28px;
  --ui-type-section: 18px;
  --ui-type-body: 16px;
  --ui-type-control: 14px;
  --ui-type-meta: 13px;
  --ui-type-caption: 12px;
}
body[data-style] .app .home-modular { font-family: var(--ui-reading-font); }
body[data-style] .app .home-title-line h1 {
  font: 600 var(--ui-type-title)/1.3 var(--ui-reading-font); letter-spacing: -.02em;
}
body[data-style] .app .home-modular :is(.home-widget-content h2,.home-agenda-head h2,.home-activity-shortcuts>header h2) {
  font: 600 var(--ui-type-section)/1.45 var(--ui-reading-font); letter-spacing: 0;
}
body[data-style] .app .home-now :is(.now-title,.next-continuation-main>b),
body[data-style] .app .home-now > .flow-continuation > div > b {
  font: 500 20px/1.5 var(--ui-reading-font); letter-spacing: 0; overflow-wrap: anywhere;
}
body[data-style] .app .home-now .now-clock {
  font-family: var(--ui-reading-font); font-size: clamp(44px,4vw,52px); font-weight: 400;
  line-height: 1.2; font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.025em;
}
body[data-style] .app .topbar .top-actions #globalTimerBtn .global-timer-clock {
  font-family: var(--ui-reading-font); font-weight: 500; font-variant-numeric: lining-nums tabular-nums; letter-spacing: 0;
}
body[data-style] .app .home-modular .lean-task-title {
  font: 500 var(--ui-type-body)/1.5 var(--ui-reading-font); letter-spacing: 0;
}
body[data-style] .app .home-modular :is(.lean-task-meta,.task-target-label,.task-folder-label,.flow-agenda-evidence,.session-start-at,.daily-home-date,.now-path,.now-subtitle) {
  font-family: var(--ui-reading-font); font-size: var(--ui-type-meta); font-weight: 400; line-height: 1.6; letter-spacing: 0;
}
body[data-style] .app .home-modular :is(.now-actions .btn,.flow-continuation-actions .btn,.home-agenda-head .btn,.home-agenda-tabs button,.slim-capture .btn) {
  font: 500 var(--ui-type-control)/1.45 var(--ui-reading-font);
}
body[data-style] .app .home-modular :is(.now-label,.home-date-year,.home-activity-copy small,.state-card-primary small,.state-card-foot time,.state-card-chips i) {
  font-family: var(--ui-reading-font); font-size: var(--ui-type-caption); font-weight: 400; line-height: 1.5; letter-spacing: 0;
}
body[data-style] .app .home-modular :is(.state-card-head,.state-card-foot strong,.home-activity-shortcuts>header>.btn) {
  font-family: var(--ui-reading-font); font-size: var(--ui-type-meta); font-weight: 500; line-height: 1.5;
}
body[data-style] .app .home-modular .state-card-primary b {
  font: 500 var(--ui-type-section)/1.5 var(--ui-reading-font);
}
body[data-style] .app .home-modular .home-activity-copy b {
  font: 500 15px/1.5 var(--ui-reading-font);
}
body[data-style] .app .home-modular .home-activity-icon { font-weight: 600; }
body[data-style] .app .home-now > :is(.flow-note-capture,.slim-recent) > summary {
  font-family: var(--ui-reading-font); font-size: var(--ui-type-meta); font-weight: 400; line-height: 1.5;
}
body[data-style] .app .home-now > .flow-continuation :is(p,small) {
  font-family: var(--ui-reading-font); font-size: var(--ui-type-meta); font-weight: 400; line-height: 1.6;
}
@media (max-width: 600px) {
  body[data-style] { --ui-type-title: 26px; }
  body[data-style] .app .home-now :is(.now-title,.next-continuation-main>b),
  body[data-style] .app .home-now > .flow-continuation > div > b { font-size: 18px; }
  body[data-style] .app .home-now .now-clock { font-size: 42px; }
}

/* Classic, refined: a quiet graphite surface, precise time, and a single accent. */
body[data-style="classic"] {
  --panel: #11171e;
  --panel-2: #171e26;
  --line: #29323c;
  --line-2: #3b4755;
  --muted: #a0acba;
  --accent: #f6bb73;
  --accent-2: #79d7c6;
  --ui-radius: 16px;
  --ui-gap: 16px;
  --sp-bg: var(--bg);
  --sp-surface: var(--panel);
  --sp-raised: var(--panel-2);
  --sp-ink: var(--text);
  --sp-muted: var(--muted);
  --sp-line: var(--line);
  --sp-primary: var(--accent);
  --sp-primary-ink: #21170b;
  --sp-cool: var(--accent-2);
  --sp-mono: "SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace;
  background-image: radial-gradient(ellipse at 75% 0,color-mix(in srgb,var(--accent-2) 3%,transparent),transparent 55%);
}
body[data-style="classic"] .app .home-modular-heading {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
body[data-style="classic"] .app .home-date-main { font-weight: 500; letter-spacing: 0; }
body[data-style="classic"] .app .home-modular .home-now {
  position: relative;
  padding: 24px;
  border-color: color-mix(in srgb,var(--accent-2) 24%,var(--line));
  border-radius: 16px;
  background: linear-gradient(115deg,color-mix(in srgb,var(--accent-2) 3%,var(--panel)),var(--panel) 65%);
  box-shadow: inset 0 1px 0 #ffffff04;
}
body[data-style="classic"] .app .home-modular .home-now .now-grid {
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 18px 28px;
}
body[data-style="classic"] .app .home-modular .home-now .now-identity { display: grid; gap: 4px; }
body[data-style="classic"] .app .home-modular .home-now .now-label {
  color: var(--muted); margin: 0 0 4px; font-size: 12px; letter-spacing: .04em;
}
body[data-style="classic"] .app .home-modular .home-now.is-timing .now-label i {
  width: 6px; height: 6px; background: var(--accent-2); box-shadow: 0 0 0 4px #79d7c60c;
}
body[data-style="classic"] .app .home-modular .home-now .now-title { margin: 0; font-weight: 550; }
body[data-style="classic"] .app .home-modular .home-now :is(.session-start-at,.now-meta) {
  font: 400 13px/1.6 var(--ui-reading-font); color: var(--muted); margin: 0; overflow-wrap: anywhere;
}
body[data-style="classic"] .app .home-modular .home-now .now-clock {
  display: flex; align-items: baseline; gap: 0;
  font: 400 clamp(38px,4vw,50px)/1.2 var(--sp-mono);
  letter-spacing: -.045em; color: var(--accent-2); white-space: nowrap;
}
body[data-style="classic"] .app .home-modular .home-now .now-clock .timer-major { font: inherit; letter-spacing: inherit; }
body[data-style="classic"] .app .home-modular .home-now .now-clock .timer-seconds {
  font: inherit; font-size: .68em; letter-spacing: -.03em; color: var(--muted); opacity: 1;
}
body[data-style="classic"] .app .home-modular .home-now .now-actions { gap: 8px; flex-wrap: wrap; }
body[data-style="classic"] .app .home-modular .home-now .now-actions .btn {
  min-height: 44px; padding: 10px 18px; border-radius: 10px;
  background: transparent; box-shadow: none;
}
body[data-style="classic"] .app .home-modular .home-now .now-actions .btn.primary {
  background: var(--accent); border-color: var(--accent); color: var(--sp-primary-ink);
}
body[data-style="classic"] .app .home-modular .home-now > :is(.flow-note-capture,.slim-recent) {
  margin-top: 14px; padding-top: 4px; border-top: 1px solid var(--line);
}
body[data-style="classic"] .app .home-modular .home-now > :is(.flow-note-capture,.slim-recent) > summary {
  display: flex; align-items: center; min-height: 44px; padding: 8px 0; list-style: none;
  color: var(--muted);
}
body[data-style="classic"] .app .home-modular .home-now > .slim-recent > summary::after {
  content: "+"; margin-left: auto; font-size: 18px; font-weight: 400;
}
body[data-style="classic"] .app .home-modular .home-now > .slim-recent[open] > summary::after { content: "−"; }
body[data-style="classic"] .app .home-modular .home-now > :is(.slim-recent,.flow-note-capture) > summary::-webkit-details-marker { display: none; }
body[data-style="classic"] .app .home-modular .home-now .slim-capture .capture-input {
  min-height: 60px; height: 60px; padding: 16px; background: #0c1117; border-color: var(--line);
}
body[data-style="classic"] .app .home-modular .home-now .slim-capture .capture-input:focus {
  border-color: var(--accent-2); box-shadow: 0 0 0 3px #79d7c60c;
}
body[data-style="classic"] .app .home-modular :is(.home-agenda,.home-records,.home-life-records) {
  background: var(--panel); box-shadow: none;
}
body[data-style="classic"] .app .home-agenda-tabs { gap: 16px; }
body[data-style="classic"] .app .home-agenda-tabs button {
  padding: 10px 2px; background: transparent; border-radius: 0; font-weight: 500;
}
body[data-style="classic"] .app .home-agenda-tabs button[aria-selected="true"] {
  background: transparent; color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent);
}
body[data-style="classic"] .app .home-agenda-count {
  font: 400 12px/1.5 var(--sp-mono); color: var(--muted); opacity: 1;
}
body[data-style="classic"] .app .home-activity-tile { min-height: 76px; border-radius: 12px; background: var(--panel); }
body[data-style="classic"] .app .home-modular .home-records .state-card { background: var(--panel-2); border-color: var(--line); }
body[data-style="classic"] .app .topbar .top-actions #globalTimerBtn .global-timer-clock {
  font-family: var(--sp-mono); font-size: 13px; letter-spacing: -.03em;
}
@media (max-width: 760px) {
  body[data-style="classic"] .app .content { padding-inline: 16px; }
  body[data-style="classic"] .app .home-modular-heading { padding-bottom: 14px; margin-bottom: 16px; }
  body[data-style="classic"] .app .home-modular .home-now { padding: 18px; }
  body[data-style="classic"] .app .home-modular .home-now .now-grid { grid-template-columns: minmax(0,1fr); gap: 14px; }
  body[data-style="classic"] .app .home-modular .home-now .now-clock {
    grid-column: 1; grid-row: auto; font-size: clamp(36px,10.5vw,44px); padding: 2px 0;
  }
  body[data-style="classic"] .app .home-modular .home-now.is-idle .now-actions { grid-column: 1; grid-row: auto; }
  body[data-style="classic"] .app .home-modular .home-now .now-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  body[data-style="classic"] .app .home-modular .home-now .now-actions.has-task-completion { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body[data-style="classic"] .app .home-modular .home-now.is-idle .now-actions { display: flex; }
  body[data-style="classic"] .app .home-modular .home-now .now-actions .btn { min-width: 0; padding: 10px 6px; font-size: 14px; white-space: normal; }
  body[data-style="classic"] .app .home-modular .home-now .slim-capture .capture-input { font-size: 16px; }
  body[data-style="classic"] .app .home-modular .home-agenda { padding: 18px 16px; }
}

/* Keep the same restrained composition in both the formal and trial shells. */
body[data-style="classic"] .app .home-modular .home-now::before,
body[data-style="classic"] .app .home-modular .home-now::after,
body[data-style="classic"] .app .home-modular .home-now .timer-decoration { display: none; }
body[data-style="classic"] .app .home-modular .home-now .now-actions { grid-column: 1/-1; margin: 0; }
body[data-style="classic"] .app .home-modular .home-now.is-idle .now-actions { grid-column: 2; grid-row: 1; }
body[data-style="classic"] .app .home-modular .home-now .now-title { font: 550 20px/1.5 var(--ui-reading-font); }
body[data-style="classic"] .app .home-modular .home-now .capture-submit-actions { display: flex; gap: 8px; }
body[data-style="classic"] .app .home-modular .home-now .capture-submit-actions .btn {
  width: auto; min-width: 0; min-height: 44px; padding: 10px 16px;
  font: 500 14px/1.5 var(--ui-reading-font); white-space: nowrap;
}
@media (max-width: 760px) {
  body[data-style="classic"] .app .home-modular .home-now.is-idle .now-actions { grid-column: 1; grid-row: auto; }
  body[data-style="classic"] .app .home-modular .home-now .now-title { font-size: 18px; }
  body[data-style="classic"] .app .home-modular .home-now .capture-submit-actions .btn { flex: 1; padding-inline: 8px; white-space: normal; }
}

/* More: useful actions first; optional depth stays one step away. */
.slim-tools { display: grid; gap: 24px; }
.slim-tools > header { max-width: 680px; }
.slim-tools > header h1 { margin: 6px 0 8px; }
.slim-tools-search { display: flex; gap: 8px; max-width: 680px; }
.slim-tools-search label { flex: 1; min-width: 0; }
.slim-tools-search .field { width: 100%; min-height: 46px; padding: 12px 15px; font: inherit; background: var(--panel); color: var(--text); border: 1px solid var(--line); }
.slim-tools .slim-tool-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.slim-tools .slim-tool { display: flex; flex-direction: column; min-width: 0; padding: 22px; box-shadow: none; background: var(--panel); }
.slim-tools .slim-tool h3 { margin: 0 0 8px; font-size: 19px; font-weight: 650; }
.slim-tools .slim-tool p { margin: 0 0 22px; color: var(--muted); font-size: 14px; line-height: 1.75; flex: 1; }
.slim-tool-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.slim-tool-actions .btn { min-height: 40px; padding: 8px 12px; font-size: 13px; }
.slim-tool-actions .btn:first-child { color: var(--accent-2); }
.slim-quick-records { display: flex; flex-wrap: wrap; gap: 8px; }
.slim-quick-records .btn { min-height: 44px; padding: 10px 18px; }
.slim-tools .slim-section-title { font-size: 15px; color: var(--muted); margin: 0 0 12px; font-weight: 500; }
.slim-tools .slim-tools-shortcuts { margin: 0; border-top: 1px solid var(--line); padding-top: 16px; }
.slim-tools [hidden],.slim-health-panels > [hidden] { display: none !important; }
.slim-resource-back { margin-bottom: 14px; }
.slim-resource-back .btn { min-height: 44px; padding-inline: 0; border-color: transparent; }
.slim-health-tabs { display: flex; gap: 5px; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); width: fit-content; max-width: 100%; }
.slim-health-tabs .btn { flex: 1; min-height: 44px; white-space: nowrap; border-color: transparent; }
.slim-health-tabs .active { color: var(--accent-2); background: color-mix(in srgb,var(--accent-2) 10%,var(--panel)); border-color: color-mix(in srgb,var(--accent-2) 30%,var(--line)); }
.slim-health-workspace > p { margin: 14px 0; }
.slim-health-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.experience-workspace > .span-12 { grid-column: 1/-1; }
.experience-memory .progress { margin: 14px 0; }
.experience-memory-note { margin: 16px 0; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.experience-memory .relation-actions { margin-top: 16px; }
.experience-workspace .slim-more-tools { margin: 0; }
@media(max-width:1100px) { .slim-tools .slim-tool-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) {
 .slim-tools { gap: 20px; }
 .slim-tools .slim-tool-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
 .slim-tools .slim-tool { padding: 20px; }
 .slim-tools .slim-tool p { margin-bottom: 16px; }
 .slim-tool-actions .btn { min-height: 44px; }
 .slim-quick-records { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
 .slim-quick-records .btn { padding: 10px 4px; font-size: 14px; }
 .slim-health-tabs { width: 100%; }
 .slim-health-tabs .btn { padding: 10px 8px; font-size: 14px; }
 .slim-tools-search .field { font-size: 16px; }
}
