/* ADHD Clarity — Slice 1. Chassis sheet/toast/pill rules kept load-bearing. */

/* >>> tokens */
:root {
  --bg: #F6F2FB;
  --surface: #ffffff;
  --text: #1C1630;
  --dim: #5C5670;
  --accent: #7B6CFF;
  --theme: #2B2450;
  --hairline: #E6E1F0;
  --danger: #9B2C4A;
  --radius: 18px;
  --radius-sm: 14px;
  --pad: 16px;
  --tap: 44px;
  --words-bg: #F3EEF8;
  --ai-bg: #EEF0FF;
  --safety-bg: #F8F1F3;
  --shadow: 0 8px 24px rgba(43, 36, 80, .08);
  --shadow-soft: 0 4px 14px rgba(43, 36, 80, .07);
  --shadow-accent: 0 8px 20px rgba(123, 108, 255, .28);
  --cal-0: #EDE8F4;
  --cal-1: #C9C0F5;
  --cal-2: #9B8CFF;
  --cal-3: #7B6CFF;
  --cal-4: #2B2450;
}
/* <<< tokens */

* { box-sizing: border-box; touch-action: manipulation; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: var(--app-height, 100dvh);
  overflow: hidden;
  touch-action: manipulation;
}

body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Avenir Next', 'Nunito Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: 8px;
  z-index: 80;
  background: var(--theme);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

#app {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
  background:
    radial-gradient(120% 48% at 50% -8%, rgba(123, 108, 255, .10), transparent 58%),
    var(--bg);
}
.vue-root {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

#appBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--pad);
  padding: 10px 20px 8px;
  flex: 0 0 auto;
}

.app-bar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}
#appTitle {
  font-size: 1.22rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--theme);
  min-width: 0;
  flex: 0 1 auto;
}
.demo-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
}
.demo-banner {
  flex: 0 0 auto;
  margin: 0 20px 8px;
  padding: 8px 12px;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--theme);
  background: rgba(123, 108, 255, 0.12);
  border-radius: 10px;
}
.demo-banner a {
  color: var(--accent);
  font-weight: 600;
}
.app-bar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 auto;
  margin-left: auto;
}
#helpBtn,
#settingsBtn {
  background: rgba(43, 36, 80, .05);
  min-width: var(--tap);
  min-height: var(--tap);
  flex-shrink: 0;
}

.screen {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0 20px calc(28px + env(safe-area-inset-bottom));
}
.screen:not([hidden]) {
  animation: screen-in 280ms ease;
}
@keyframes screen-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.capture-screen,
#screenUnderstand,
#screenDetail,
#screenOnboarding {
  padding-bottom: calc(var(--pad) + env(safe-area-inset-bottom) + 16px);
}

.screen > h2 {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--theme);
  margin: 0 0 1rem;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid rgba(230, 225, 240, .65);
  box-shadow: var(--shadow);
  margin: 0 0 12px;
}
.card h2, .card h3 {
  margin: 0 0 .45rem;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--theme);
}
.card p { margin: 0 0 .75rem; }
.card p:last-child { margin-bottom: 0; }
.dim { color: var(--dim); }
code { background: var(--hairline); padding: .1em .4em; border-radius: 6px; font-size: .9em; }

.icon-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 10px;
  min-width: var(--tap);
  min-height: var(--tap);
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  transition: background-color 180ms ease, transform 180ms ease;
}
.icon-btn:hover { background: rgba(43, 36, 80, .06); }
.icon-btn:active { background: rgba(43, 36, 80, .08); transform: scale(0.97); }
.icon-btn:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-danger:focus-visible,
.chip:focus-visible,
.tab:focus-visible,
.chooser-card:focus-visible,
.text-btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 22, 48, .45);
  display: flex;
  align-items: flex-end;
  z-index: 40;
}
.sheet-backdrop[hidden] { display: none; }
.sheet-backdrop:not([hidden]) {
  animation: backdrop-in 220ms ease;
}
@keyframes backdrop-in {
  from { background: rgba(28, 22, 48, 0); }
  to { background: rgba(28, 22, 48, .45); }
}

.sheet {
  background: var(--surface);
  color: var(--text);
  width: 100%;
  border-radius: 22px 22px 0 0;
  padding: 8px 20px 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  max-height: 85%;
  overflow-y: auto;
  box-shadow: 0 -12px 40px rgba(43, 36, 80, .14);
  animation: sheet-in 280ms ease;
}
/* No grabber: sheets close via the X / data-close, not swipe. */
@keyframes sheet-in {
  from { transform: translateY(18px); opacity: .6; }
  to { transform: none; opacity: 1; }
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: .35rem;
}
.sheet-head h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--theme);
}
.sheet-foot {
  margin-top: 1.35rem;
  display: flex;
  gap: .5rem;
  align-items: center;
  font-size: .85rem;
  flex-wrap: wrap;
}
.sheet-foot a { color: var(--dim); }
#appVersion { margin-left: auto; font-variant-numeric: tabular-nums; }

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  min-height: var(--tap);
  border-bottom: 1px solid var(--hairline);
}
.row:last-of-type,
.row:last-child { border-bottom: 0; }
.row input[type="text"],
.row input[type="date"],
.row input[type="time"] {
  font: inherit;
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  min-height: var(--tap);
  max-width: 12rem;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.row input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
  flex: none;
}

.pill {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  font: inherit;
  font-size: .9rem;
  cursor: pointer;
  z-index: 60;
  box-shadow: 0 6px 24px rgba(28, 22, 48, .18);
}
.pill[hidden] { display: none; }

.update-toast { bottom: calc(18px + env(safe-area-inset-bottom)); background: var(--accent); color: #fff; }
.install-hint { bottom: calc(88px + env(safe-area-inset-bottom)); background: var(--surface); color: var(--text); }

#toast, #syncStatus {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: calc(12px + env(safe-area-inset-top));
  background: rgba(28, 22, 48, .92);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: .9rem;
  z-index: 70;
  pointer-events: none;
  max-width: calc(100% - 32px);
}
#toast[hidden], #syncStatus[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .screen:not([hidden]) { animation: none; }
  .sheet-backdrop:not([hidden]),
  .sheet-backdrop:not([hidden]) .sheet { animation: none; }
  .btn-primary:active,
  .btn-secondary:active,
  .btn-danger:active,
  .chip:active,
  .entry-card:active,
  .icon-btn:active,
  .tab:active { transform: none; }
  .tab-log,
  .tab-log:active { transform: none; }
}

@media (prefers-contrast: more) {
  :root {
    --text: #110C1C;
    --dim: #3A3550;
    --hairline: #1C1630;
    --shadow: none;
    --shadow-soft: none;
    --shadow-accent: none;
    --cal-0: #ffffff;
    --cal-1: #B7ABF2;
    --cal-2: #7B6CFF;
    --cal-3: #4A3DA8;
    --cal-4: #110C1C;
  }
  .btn-primary { border: 2px solid #110C1C; }
  .tab-log-icon {
    box-shadow: none;
    outline: 2px solid #110C1C;
    outline-offset: 2px;
  }
  .card,
  .entry-card,
  .resume-row,
  .chooser-card,
  textarea,
  #timelineSearch,
  #learnSearch,
  #clinicianQuestions,
  .row input[type="text"],
  .row input[type="date"] {
    border: 2px solid var(--hairline);
    box-shadow: none;
  }
}

/* overflow-y:auto on .screen computes overflow-x to auto and clips
   box-shadows at the scrollport. Home cards sit in .home-col so the 24px
   shadow stays inside the content box instead of against that clip. */
#screenHome.screen {
  overflow-x: hidden;
  overflow-y: auto;
  padding-left: 0;
  padding-right: 0;
}
.home-col {
  padding: 0 28px;
  overflow: visible;
}

.home-hero { margin: .1rem 0 1.35rem; }
.greeting {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 .55rem;
  color: var(--theme);
}
.prompt {
  margin: 0 0 .85rem;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.4;
  max-width: 28em;
}
.section-title {
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 1.6rem 0 .75rem;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  margin: 0 0 .5rem;
  font-size: .72rem;
  font-weight: 650;
}

.btn-primary, .btn-secondary, .btn-danger, .btn-hero {
  appearance: none;
  font: inherit;
  font-weight: 600;
  border-radius: var(--radius-sm);
  min-height: var(--tap);
  padding: 12px 16px;
  cursor: pointer;
  width: 100%;
  border: 0;
  transition: background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover { background: #6c5df5; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-soft);
}
.btn-secondary:hover { background: var(--words-bg); }
.btn-secondary:active { transform: scale(0.98); }
.btn-danger {
  background: var(--surface);
  color: var(--danger);
  border: 1px solid #E8C9D2;
  box-shadow: var(--shadow-soft);
}
.btn-danger:hover { background: var(--safety-bg); }
.btn-danger:active { transform: scale(0.98); }
.btn-hero { font-size: 1.05rem; margin-bottom: 0; }
.home-hero .btn-hero { margin-top: .15rem; margin-bottom: 0; }
.home-hero .tip-card {
  margin: 0;
  background: var(--ai-bg);
  border: 0;
  border-left: 0;
}
.tip-card-note { display: block; margin-top: .45rem; }

.home-tips { margin: .32rem 0 .15rem; overflow: visible; }
.home-tips-scroller {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scroll-padding-inline: 28px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: none;
  /* Keep the 0 8px 24px card shadow inside this box; overflow-x:auto
     otherwise shears it on the bottom and sides. */
  margin: 0 -28px;
  padding: 12px 28px 24px;
}
.home-tips-scroller::-webkit-scrollbar { display: none; }
.home-tip-slide {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 calc(100% - 28px);
  width: calc(100% - 28px);
  min-width: calc(100% - 28px);
  max-width: calc(100% - 28px);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  box-sizing: border-box;
  margin: 0;
  min-height: 9.5rem;
}
.home-tips-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Sit in the scroller’s shadow gutter so the dots hug the card. */
  margin-top: -28px;
  margin-bottom: -10px;
}
.home-tips-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
  margin: 0;
}
.home-tips-dot {
  appearance: none;
  width: var(--tap);
  height: var(--tap);
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.home-tips-dot::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--hairline);
  transform: translate(-50%, -50%);
  transition: width 180ms ease, background-color 180ms ease;
}
.home-tips-dot[aria-selected="true"]::after {
  width: 22px;
  background: var(--theme);
}
@media (prefers-reduced-motion: reduce) {
  .home-tips-scroller { scroll-behavior: auto; }
  .home-tips-dot::after { transition: none; }
}

.log-cal {
  margin: 0 0 1.25rem;
  padding: 14px 14px 12px;
}
.log-cal.card h2.section-title,
.log-cal.card h3.section-title,
.trend-rise.card h2.section-title,
.trend-rise.card h3.section-title {
  margin: 0 0 .2rem;
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dim);
}
.log-cal-head { margin-bottom: .75rem; }
.log-cal-head .micro { margin: 0; }
.log-cal-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px 8px;
  padding: 0 4px 4px;
}
.log-cal-chart {
  --cal-size: 11px;
  --cal-gap: 3px;
  display: grid;
  grid-template-columns: 26px auto;
  grid-template-rows: 16px auto;
  width: max-content;
  min-width: 100%;
}
.log-cal-months {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  gap: var(--cal-gap);
  height: 16px;
}
.log-cal-month {
  width: var(--cal-size);
  flex: none;
  font-size: 9px;
  line-height: 14px;
  color: var(--dim);
  overflow: visible;
  white-space: nowrap;
}
.log-cal-wdays {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  grid-template-rows: repeat(7, var(--cal-size));
  gap: var(--cal-gap);
  font-size: 9px;
  line-height: var(--cal-size);
  color: var(--dim);
  padding-right: 6px;
}
.log-cal-weeks {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  gap: var(--cal-gap);
}
.log-cal-week {
  display: flex;
  flex-direction: column;
  gap: var(--cal-gap);
}
.log-cal-cell {
  width: var(--cal-size, 11px);
  height: var(--cal-size, 11px);
  border-radius: 2px;
  background: var(--cal-0);
  display: inline-block;
  flex: none;
}
.log-cal-cell[data-level="0"] { background: var(--cal-0); }
.log-cal-cell[data-level="1"] { background: var(--cal-1); }
.log-cal-cell[data-level="2"] { background: var(--cal-2); }
.log-cal-cell[data-level="3"] { background: var(--cal-3); }
.log-cal-cell[data-level="4"] { background: var(--cal-4); }
.log-cal-cell[data-level="-1"] { visibility: hidden; }
.log-cal-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: .75rem;
  color: var(--dim);
  margin-top: 4px;
}
.log-cal-legend .log-cal-cell { --cal-size: 10px; }
.log-cal-caption { margin: .55rem 0 0; }

.btn-row { display: flex; gap: 8px; margin-top: 12px; }
.btn-row > * { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.text-btn {
  appearance: none;
  background: none;
  border: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  min-height: var(--tap);
  padding: 8px 0;
  cursor: pointer;
  text-align: left;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: var(--tap);
  margin: 1rem 0;
}
.check-row input { width: 22px; height: 22px; margin-top: 4px; flex: none; accent-color: var(--accent); }

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: .25rem 0 1rem;
}
.chip {
  appearance: none;
  font: inherit;
  font-size: .95rem;
  min-height: var(--tap);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.chip:hover { border-color: var(--accent); }
.chip:active { transform: scale(0.98); }
.chip[aria-pressed="true"] {
  background: var(--theme);
  color: #fff;
  border-color: var(--theme);
  box-shadow: 0 4px 12px rgba(43, 36, 80, .18);
}

.field-label {
  margin: 1.05rem 0 .4rem;
  font-weight: 650;
  color: var(--theme);
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}
.optional { font-weight: 400; color: var(--dim); }
.micro { margin: 0; font-size: .9rem; color: var(--dim); }
.block { margin-top: .25rem; }

#captureTitle {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--theme);
  margin: .15rem 0 .55rem;
}
#capturePrompt {
  display: block;
  font-weight: 600;
  color: var(--dim);
  margin: 0 0 .5rem;
}

textarea {
  width: 100%;
  font: inherit;
  line-height: 1.45;
  padding: 14px 16px;
  border-radius: 16px;
  border: 0;
  background: var(--surface);
  color: var(--text);
  min-height: 8rem;
  resize: vertical;
  box-shadow: var(--shadow);
}
.voice-status {
  margin: .45rem 0 0;
}

.safety-line {
  background: var(--words-bg);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: .95rem;
  color: var(--text);
  margin: 0 0 12px;
}
.plain-list { padding-left: 1.15rem; }
.plain-list li { margin: .4rem 0; }
.help-note { font-size: .95rem; color: var(--dim); margin: 0 0 .5rem; }
.help-list { margin: 0 0 1rem; padding-left: 1.15rem; }
.help-list li { margin: .45rem 0; }
.learn-tip { margin: .35rem 0 0; font-size: .9rem; }
.learn-tldr {
  margin: .15rem 0 1rem;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--ai-bg);
  font-size: .95rem;
  line-height: 1.4;
  color: var(--text);
}
.learn-tldr-label {
  display: block;
  margin: 0 0 .2rem;
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--theme);
}
.learn-card .excerpt {
  margin: 0;
  font-weight: 650;
  color: var(--theme);
}
.learn-card-tag {
  display: inline-block;
  margin: .7rem 0 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .02em;
  background: var(--ai-bg);
  color: var(--theme);
}
#detailManage { margin-top: .75rem; width: 100%; }

.words-card { background: var(--words-bg); border-color: transparent; }
.ai-card { background: var(--ai-bg); border-color: transparent; }
.safety-card { background: var(--safety-bg); border: 1px solid #E8C9D2; }
.original-text { white-space: pre-wrap; margin: 0; }
.ai-kicker {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--theme);
  margin: 0 0 .4rem;
}
.caveat { font-size: .95rem; color: var(--dim); }

.empty, .empty-card { color: var(--dim); }
.empty {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.error { color: var(--danger); margin: .35rem 0; }

.entry-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.entry-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
}
.entry-row .entry-card { flex: 1; min-width: 0; }
.entry-row .entry-share {
  flex: 0 0 var(--tap);
  align-self: center;
  color: var(--theme);
}
.entry-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 0;
  border-radius: var(--radius);
  padding: 16px 18px;
  min-height: var(--tap);
  font: inherit;
  color: inherit;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: box-shadow 180ms ease, transform 180ms ease;
}
.entry-card:hover { box-shadow: 0 10px 28px rgba(43, 36, 80, .12); }
.entry-card:active { transform: scale(0.99); }
.entry-card .kicker {
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--theme);
}
.entry-card .excerpt {
  margin: .4rem 0 0;
  color: var(--text);
  line-height: 1.45;
}
.entry-card .dim { margin: .3rem 0 0; font-size: .9rem; }
.badge {
  display: inline-block;
  background: var(--theme);
  color: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .8rem;
  font-weight: 650;
  margin: 0 0 12px;
}
.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}
.detail-head .text-btn {
  flex: 0 0 auto;
}
.detail-head .badge {
  margin: 0;
  flex: 0 0 auto;
}

.resume-row {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 0;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 18px;
  min-height: var(--tap);
  font: inherit;
  color: inherit;
  cursor: pointer;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  transition: box-shadow 180ms ease, transform 180ms ease;
}
.resume-row:hover { box-shadow: 0 10px 28px rgba(43, 36, 80, .12); }
.resume-row:active { transform: scale(0.99); }
.resume-kicker {
  display: block;
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .3rem;
}

.chooser-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 0;
  border-radius: var(--radius);
  padding: 18px;
  min-height: 72px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  margin: 10px 0;
  box-shadow: var(--shadow);
  transition: box-shadow 180ms ease, transform 180ms ease;
}
.chooser-card:hover { box-shadow: 0 10px 28px rgba(43, 36, 80, .12); }
.chooser-card:active { transform: scale(0.99); }
.chooser-card strong { display: block; font-size: 1.08rem; color: var(--theme); }
.chooser-card span { color: var(--dim); }
.chooser-card.suggested {
  box-shadow: 0 8px 24px rgba(123, 108, 255, .16);
  outline: 2px solid var(--accent);
  outline-offset: 0;
}
.chooser-last {
  display: block;
  margin-top: 6px;
  color: var(--accent) !important;
  font-size: .85rem;
  font-weight: 600;
}

.tabbar {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  align-items: end;
  background: rgba(255, 255, 255, .84);
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
  backdrop-filter: blur(16px) saturate(1.35);
  border-top: 1px solid rgba(230, 225, 240, .7);
  padding: 8px 8px calc(6px + env(safe-area-inset-bottom));
  flex: 0 0 auto;
  z-index: 20;
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
}
.tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--dim);
  font: inherit;
  font-size: .68rem;
  font-weight: 600;
  box-sizing: border-box;
  width: auto;
  height: auto;
  min-width: var(--tap);
  min-height: var(--tap);
  max-width: 100%;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  justify-self: center;
  gap: 2px;
  padding: 4px 6px 2px;
  -webkit-tap-highlight-color: transparent;
  transition: color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.tab-label {
  display: block;
  line-height: 1.1;
  white-space: nowrap;
}
.tab-icon {
  display: flex;
  width: 22px;
  height: 22px;
  line-height: 0;
  pointer-events: none;
  color: inherit;
}
.tab-icon svg { width: 22px; height: 22px; display: block; stroke: currentColor; }
.tab:active { transform: scale(0.97); background: transparent; }
.tab:not(.tab-log):active,
.tab[aria-current="page"] {
  background: transparent;
  color: var(--theme);
}
.tab[aria-current="page"] {
  color: var(--theme);
  box-shadow: none;
}
.tab-log {
  background: transparent;
  color: var(--accent) !important;
  border-radius: 16px;
  font-weight: 700;
  font-size: .68rem;
  box-shadow: none;
  z-index: 21;
  overflow: visible;
  position: relative;
  pointer-events: auto;
  margin: -66px 0 0;
  gap: 2px;
  justify-content: flex-end;
  justify-self: stretch;
  align-self: end;
  width: 100%;
  max-width: none;
  height: auto;
  min-width: 0;
  min-height: var(--tap);
  padding: 70px 0 2px;
}
.tab-log[aria-current] {
  background: transparent;
  color: var(--accent) !important;
  box-shadow: none;
}
.tab-log:hover { background: transparent; }
.tab-log:active { transform: scale(0.97); background: transparent; }
.tab-log-icon {
  width: 72px;
  height: 72px;
  padding: 0;
  margin-top: -66px;
  margin-bottom: 8px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 72px;
  background: var(--theme);
  pointer-events: auto;
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 5px rgba(123, 108, 255, .42),
    0 10px 22px rgba(43, 36, 80, .28);
}
.tab-log-icon img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  display: block;
  pointer-events: auto;
}
#tabLog::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 72px;
  height: 72px;
  margin-left: -36px;
  border-radius: 50%;
  pointer-events: auto;
}

.segmented {
  display: flex;
  gap: 4px;
  background: rgba(230, 225, 240, .85);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 12px;
}
.seg {
  flex: 1;
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 600;
  min-height: var(--tap);
  border-radius: 12px;
  cursor: pointer;
  color: var(--dim);
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}
.seg[aria-selected="true"],
.seg[aria-pressed="true"] {
  background: var(--surface);
  color: var(--theme);
  box-shadow: 0 2px 8px rgba(43, 36, 80, .10);
}

.meta-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 14px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  margin: 0 0 12px;
}
.meta-list dt { color: var(--dim); font-size: .9rem; }
.meta-list dd { margin: 0; }

.skeleton {
  height: 12px;
  border-radius: 8px;
  background: linear-gradient(90deg, #ddd6f3, #f6f2fb, #ddd6f3);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
  margin-bottom: 8px;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; background: var(--hairline); }
}

.undo-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(80px + env(safe-area-inset-bottom));
  background: var(--theme);
  color: #fff;
  padding: 8px 8px 8px 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 65;
  min-height: var(--tap);
  box-shadow: 0 8px 24px rgba(43, 36, 80, .22);
}
.undo-bar .text-btn { color: #fff; padding: 8px 12px; }
.undo-bar[hidden] { display: none; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.settings-h {
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 1.6rem 0 .7rem;
}
.settings-copy { font-size: .95rem; color: var(--dim); line-height: 1.5; }
.settings-group,
#addonSettings:not(:empty) {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 4px 14px;
  margin: .85rem 0 1.1rem;
  box-shadow: var(--shadow-soft);
}
.row-btn {
  appearance: none;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  font: inherit;
  min-height: var(--tap);
  padding: 12px 0;
  cursor: pointer;
  color: inherit;
}
.settings-group .row-btn:last-child { border-bottom: 0; }
.danger-text { color: var(--danger); }

.more-details { margin: .5rem 0 1rem; }
.more-details summary {
  min-height: var(--tap);
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
}

#prefFirstName { color: var(--text); }

.search-label {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0 0 8px;
}
#timelineSearch,
#learnSearch {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 12px 16px;
  min-height: var(--tap);
  border: 0;
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.timeline-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.timeline-tools .btn-secondary {
  flex: 0 0 auto;
  width: auto;
  padding: 0 14px;
}
.tool-with-glyph {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.tool-with-glyph > .tool-glyph {
  flex: 0 0 auto;
  display: inline-flex;
  color: var(--dim);
  line-height: 0;
}
.learn-tools .tool-with-glyph {
  width: 100%;
}
.learn-tools .tool-with-glyph .segmented:not(.sort-seg) {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}
.sort-seg {
  --sort-inset: 6px;
  position: relative;
  isolation: isolate;
  flex: 0 1 auto;
  align-self: flex-start;
  width: max-content;
  max-width: 100%;
  margin-bottom: 0;
  padding: 0;
  gap: 0;
  background: transparent;
  border-radius: 0;
  min-height: var(--tap);
}
.sort-seg::before {
  content: "";
  position: absolute;
  inset: var(--sort-inset) 0;
  background: rgba(230, 225, 240, .85);
  border-radius: 999px;
  z-index: 0;
  pointer-events: none;
}
.sort-seg .seg {
  position: relative;
  z-index: 1;
  isolation: isolate;
  flex: 0 1 auto;
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 0 12px;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 999px;
  white-space: nowrap;
  background: transparent;
  box-shadow: none;
}
.sort-seg .seg[aria-pressed="true"],
.sort-seg .seg[aria-selected="true"] {
  background: transparent;
  color: var(--theme);
  box-shadow: none;
}
.sort-seg .seg[aria-pressed="true"]::before,
.sort-seg .seg[aria-selected="true"]::before {
  content: "";
  position: absolute;
  inset: var(--sort-inset) 2px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(43, 36, 80, .10);
  z-index: -1;
}
.sort-seg .seg:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.learn-tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.learn-filter { margin-bottom: 0; }
.learn-filter .seg { font-size: .85rem; }
.timeline-count { margin: 0 0 10px; font-size: .9rem; }
.warn-card {
  background: #fff8f0;
  border: 1px solid #ead7c0;
}
.warn-card h3 { margin: 0 0 .35rem; }

.check-list { list-style: none; margin: .5rem 0 0; padding: 0; }
.check-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  align-items: center;
  border-bottom: 1px solid var(--hairline);
  padding: 8px 0;
}
.check-list li:last-child { border-bottom: 0; }
.status-pill {
  flex: none;
  font-size: .75rem;
  font-weight: 650;
  letter-spacing: .02em;
  text-transform: lowercase;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--hairline);
  color: var(--dim);
}
.status-pill[data-status="included"] {
  background: var(--ai-bg);
  color: var(--theme);
}
.status-pill[data-status="optional"] {
  background: var(--words-bg);
  color: var(--dim);
}
.report-screen {
  padding-bottom: calc(36px + env(safe-area-inset-bottom));
}
.report-hero { margin: .1rem 0 1.75rem; }
.report-hero .screen-h {
  margin: 0 0 .5rem;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--theme);
}
.report-hero .prompt {
  margin: 0;
  color: var(--dim);
  font-size: 1.02rem;
  line-height: 1.5;
  max-width: 32em;
}
.report-lead {
  margin: 0 0 1.2rem;
  font-size: .98rem;
  line-height: 1.55;
  color: var(--dim);
  max-width: 36em;
}
.report-block { margin-bottom: 2rem; }
.report-block:last-child { margin-bottom: 0; }
.report-block > .section-title {
  text-transform: none;
  letter-spacing: -0.02em;
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--theme);
  margin: 0 0 1rem;
}
.report-block .card { margin-bottom: 14px; }
.pattern-card { padding: 20px 18px 22px; }
.pattern-card .pattern-card-title {
  margin: 0 0 .7rem;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}
.pattern-card .pattern-prose {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text);
  max-width: 36em;
}
.pattern-card .pattern-meta {
  margin: .75rem 0 0;
  line-height: 1.5;
}
.report-block .entry-list { margin-top: .15rem; }
.report-block .entry-card .excerpt { line-height: 1.55; }
.report-step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: start;
  margin: 0 0 1.15rem;
}
.report-step:last-child { margin-bottom: 0; }
.report-step-num {
  margin: 18px 0 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #1A1535;
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.report-step-title {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin: 0 0 .4rem;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--theme);
}
.report-subh {
  margin: 1.35rem 0 .55rem;
  padding: 0;
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dim);
}
.report-block > .report-subh {
  margin: 1.35rem 0 .7rem;
}
.report-config {
  margin: 0;
  padding: 20px 18px 16px;
}
.report-config .report-config-lead {
  margin: 0 0 .35rem;
  line-height: 1.5;
  max-width: 36em;
}
.report-group {
  background: var(--words-bg);
  border-radius: var(--radius-sm);
  padding: 12px 14px 8px;
  margin: .85rem 0 0;
}
.report-group .report-subh {
  margin: 0 0 .2rem;
  padding: 2px 2px 0;
}
.report-group .row {
  padding: 11px 2px;
}
.report-group .row > span:not(.row-trail) {
  line-height: 1.45;
}
.report-questions {
  margin-top: 0;
  gap: 8px;
}
.report-group .report-questions.stack { margin-top: 0; }
.report-export { margin: 0; padding: 20px 18px 18px; }
.report-export .dim {
  margin: 0 0 .85rem;
  line-height: 1.5;
  max-width: 32em;
}
.report-export .btn-primary { margin-top: .15rem; }
.share-funny-block .report-export { margin-top: .35rem; }
.share-funny-block .btn-secondary { margin-top: .15rem; }
#reportPreviewSheet .sheet {
  display: flex;
  flex-direction: column;
  max-height: min(92dvh, 92%);
  overflow: hidden;
}
#reportPreviewSheet .sheet-head {
  margin-bottom: .55rem;
}
#reportPreviewSheet .sheet-head,
#reportPreviewSheet .report-preview-lede,
#reportPreviewSheet .report-preview-actions {
  flex: 0 0 auto;
}
.report-preview-lede {
  margin: 0 0 1rem;
  font-size: .95rem;
  line-height: 1.5;
  color: var(--dim);
  max-width: 36em;
}
.report-preview {
  font: inherit;
  font-size: .95rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px;
  flex: 1 1 auto;
  min-height: 12rem;
  max-height: none;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
}
.report-preview-intro {
  position: sticky;
  left: 0;
  max-width: 100%;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 16px 18px 18px;
  margin: 0 0 14px;
  box-shadow: var(--shadow-soft);
}
.report-preview-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--theme);
}
.report-preview-headline {
  margin: .55rem 0 0;
  color: var(--dim);
  font-size: .98rem;
  line-height: 1.55;
  max-width: 36em;
}
.report-preview-intro .report-subh {
  margin: 1.15rem 0 .45rem;
}
.report-preview-questions {
  margin: 0;
  line-height: 1.55;
  white-space: pre-wrap;
  max-width: 36em;
}
.report-preview-actions { margin-top: 14px; }
.report-table-wrap {
  overflow: visible;
  margin: 0;
}
.report-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .82rem;
  background: var(--surface);
}
.report-table th,
.report-table td {
  border: 1px solid var(--hairline);
  border-width: 0 1px 1px 0;
  padding: .45rem .55rem;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}
.report-table th:first-child,
.report-table td:first-child { border-left-width: 1px; }
.report-table thead th { border-top-width: 1px; }
.report-table th {
  font-size: .68rem;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--dim);
  background: #f7f4fb;
  position: sticky;
  top: 0;
  z-index: 2;
}
.report-table td[data-col="originalText"],
.report-table td[data-col="aiSummary"] {
  white-space: normal;
  min-width: 12rem;
  max-width: 18rem;
  overflow-wrap: break-word;
}
#clinicianQuestions {
  width: 100%;
  font: inherit;
  min-height: 88px;
  padding: 12px 14px;
  border: 0;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.onboard-screen { display: flex; flex-direction: column; }
.onboard-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 0 0;
  flex: 0 0 auto;
}
.onboard-dot {
  width: 8px;
  height: 8px;
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: var(--hairline);
  cursor: pointer;
  transition: width 180ms ease, background-color 180ms ease;
}
.onboard-dot[aria-selected="true"] { background: var(--theme); width: 22px; }
.onboard-scroller {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  flex: 1 1 auto;
  min-height: 0;
  padding: 4px 0 0;
  padding-inline: 0;
  scrollbar-width: none;
}
.onboard-scroller::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: reduce) {
  .onboard-scroller { scroll-behavior: auto; }
  .onboard-dot { transition: none; }
}
.onboard-card {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  box-sizing: border-box;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: 14px 16px 1.25rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.onboard-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--theme);
  margin: 0 0 .65rem;
}
.onboard-card > p { margin: 0 0 .85rem; }
.onboard-shot {
  background: var(--surface);
  border: 0;
  border-radius: var(--radius);
  padding: 16px;
  margin: 1rem 0 1.25rem;
  box-shadow: var(--shadow);
}
.onboard-shot.compact { flex: 1; margin: 0; }
.onboard-shot-row { display: flex; gap: 10px; margin: 1rem 0 1.25rem; }
.onboard-shot-bar { font-size: .8rem; font-weight: 650; color: var(--theme); margin-bottom: 10px; }
.onboard-shot-field {
  background: var(--words-bg);
  border-radius: 12px;
  padding: 14px 12px;
  color: var(--dim);
  min-height: 52px;
  font-size: .95rem;
}
.onboard-shot-chips { display: flex; gap: 6px; margin: 10px 0; }
.onboard-shot-chips span {
  background: var(--ai-bg);
  color: var(--theme);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .8rem;
  font-weight: 650;
}
.onboard-shot-btn {
  background: var(--theme);
  color: #fff;
  border-radius: var(--radius-sm);
  text-align: center;
  padding: 10px;
  font-weight: 650;
}
.onboard-shot-line {
  height: 8px;
  border-radius: 999px;
  background: var(--hairline);
  margin: 8px 0;
}
.onboard-shot-line.short { width: 62%; }

.sheet-backdrop:not([hidden]) .sheet {
  animation: sheet-in 220ms ease;
}

.screen-h {
  display: flex;
  align-items: center;
  gap: 10px;
}
.screen-h-icon,
.section-head-icon {
  display: inline-flex;
  color: var(--accent);
  flex: 0 0 auto;
  line-height: 0;
}
.section-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.log-cal-head.section-head,
.home-recent-head {
  justify-content: space-between;
}
.home-recent-head .icon-btn {
  margin: -10px -6px;
}
.log-cal-head .section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.hint-wrap {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
  flex: 0 0 auto;
}
.hint-btn {
  color: var(--accent);
  margin: -10px -6px;
}
.row-trail .hint-btn {
  margin: 0;
}
.hint-bubble {
  display: block;
  position: fixed;
  z-index: 45;
  left: 0;
  top: 0;
  width: min(17.5rem, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  visibility: hidden;
  background: var(--theme);
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: 0 12px 28px rgba(43, 36, 80, .24);
}
.hint-bubble.is-placed { visibility: visible; }
.hint-bubble[hidden] { display: none; }

.help-kicker {
  margin: 0 0 .45rem;
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}

.btn-glyph {
  display: inline-flex;
  line-height: 0;
  margin-right: 8px;
  vertical-align: middle;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chooser-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: start;
}
.chooser-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--ai-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.chooser-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.entry-card.has-icon {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 4px 12px;
  align-items: start;
}
.entry-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ai-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.entry-card-body { min-width: 0; }

.empty-glyph {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.empty-icon {
  display: flex;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--ai-bg);
  color: var(--accent);
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.week-bars.card { padding: 14px 14px 12px; }
.week-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  height: 76px;
  margin: .55rem 0 .2rem;
}
.week-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  gap: 6px;
}
.week-bar-track {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 0;
}
.week-bar {
  width: 100%;
  max-width: 28px;
  min-height: 6px;
  border-radius: 6px 6px 2px 2px;
  background: var(--cal-0);
}
.week-bar[data-level="1"] { background: var(--cal-1); }
.week-bar[data-level="2"] { background: var(--cal-2); }
.week-bar[data-level="3"] { background: var(--cal-3); }
.week-bar[data-level="4"] { background: var(--cal-4); }
.week-bar[data-today="1"] {
  box-shadow: 0 0 0 2px var(--theme);
}
.week-label {
  font-size: .7rem;
  color: var(--dim);
  font-weight: 650;
}

.trend-rise.card { padding: 14px 14px 12px; }
.trend-chart { margin: .35rem 0 .15rem; }
.trend-legend {
  display: flex;
  gap: 14px;
  margin: 0 0 .65rem;
  font-size: .75rem;
  color: var(--dim);
}
.trend-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.trend-swatch,
.trend-dot {
  display: inline-block;
  border-radius: 50%;
  flex: none;
}
.trend-swatch {
  width: 9px;
  height: 9px;
}
.trend-swatch.is-last,
.trend-dot.is-last { background: var(--cal-1); }
.trend-swatch.is-this,
.trend-dot.is-this { background: var(--theme); }
.trend-row + .trend-row { margin-top: 10px; }
.trend-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}
.trend-name {
  font-size: .92rem;
  font-weight: 650;
  color: var(--theme);
  line-height: 1.3;
}
.trend-delta {
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent);
  flex: none;
}
.trend-track {
  position: relative;
  height: 28px;
  margin: 0 6px 0 4px;
}
.trend-rail {
  position: absolute;
  left: 0;
  right: 0;
  top: 18px;
  height: 3px;
  border-radius: 99px;
  background: var(--cal-0);
}
.trend-link {
  position: absolute;
  top: 18px;
  height: 3px;
  border-radius: 99px;
  background: var(--cal-2);
}
.trend-dot {
  position: absolute;
  top: 19.5px;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
}
.trend-dot.is-this {
  width: 13px;
  height: 13px;
  box-shadow: 0 0 0 2px var(--cal-1);
}
.trend-count {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 3px);
  transform: translateX(-50%);
  font-size: .68rem;
  font-weight: 700;
  color: var(--theme);
  line-height: 1;
}
.log-cal-chart.is-compact {
  --cal-size: 8px;
  --cal-gap: 2px;
}
.log-cal-chart.is-compact .log-cal-wdays {
  font-size: 8px;
  padding-right: 4px;
}
.report-preview-insight {
  margin-top: 1.1rem;
}
.report-preview-insight .micro,
.report-preview-insight p {
  margin: .2rem 0 .55rem;
  color: var(--dim);
  line-height: 1.5;
}
.report-preview-insight .log-cal-scroll { margin-left: 0; }

.complete-bar {
  display: flex;
  gap: 6px;
  margin: .35rem 0 .85rem;
}
.complete-seg {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: var(--cal-0);
}
.complete-seg[data-status="included"] { background: var(--accent); }
.complete-seg[data-status="optional"] { background: var(--cal-1); }
.complete-seg[data-status="not added"] { background: var(--cal-0); }

.flow-steps {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.flow-steps li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  font-size: .78rem;
  font-weight: 650;
  color: var(--theme);
  background: var(--surface);
  border-radius: 14px;
  padding: 10px 6px;
  box-shadow: var(--shadow-soft);
}
.flow-icon {
  display: flex;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--ai-bg);
  color: var(--accent);
  align-items: center;
  justify-content: center;
}

.learn-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}
.learn-tabs .segmented { flex: 1; margin-bottom: 0; }
.row > span:not(.row-trail) {
  min-width: 0;
  flex: 1 1 auto;
}
.row:has(.row-trail) {
  align-items: flex-start;
}
.row-trail {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 2px;
  min-height: var(--tap);
}
.slot-trail {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
}
.slot-trail input[type="time"] {
  max-width: 7.6rem;
  padding: 6px 8px;
}
.onboard-remind {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 1rem;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-soft);
  text-align: left;
  font-size: .95rem;
  line-height: 1.45;
  color: var(--text);
  cursor: pointer;
}
.onboard-remind input {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex: none;
}

.onboard-glyph {
  display: flex;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--ai-bg);
  color: var(--accent);
  align-items: center;
  justify-content: center;
  margin: 0 0 12px;
}

/* >>> addon-styles */
/* <<< addon-styles */

/* micro-interactions */
@keyframes sheet-out {
  from { transform: none; opacity: 1; }
  to { transform: translateY(18px); opacity: 0; }
}
@keyframes backdrop-out {
  from { background: rgba(28, 22, 48, .45); }
  to { background: rgba(28, 22, 48, 0); }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes hint-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sheet-backdrop.is-closing {
  animation: backdrop-out 220ms ease forwards;
  pointer-events: none;
}
.sheet-backdrop.is-closing .sheet {
  animation: sheet-out 220ms ease forwards;
}

#toast:not([hidden]),
#syncStatus:not([hidden]),
.pill:not([hidden]) {
  animation: toast-in 200ms ease;
}

.hint-bubble.is-placed {
  animation: hint-in 180ms ease;
}

.row-btn,
.text-btn {
  transition: background-color 180ms ease, transform 180ms ease, color 180ms ease;
}
.row-btn:active,
.text-btn:active {
  transform: scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
  .sheet-backdrop.is-closing,
  .sheet-backdrop.is-closing .sheet,
  #toast:not([hidden]),
  #syncStatus:not([hidden]),
  .pill:not([hidden]),
  .hint-bubble.is-placed {
    animation: none;
  }
  .row-btn:active,
  .text-btn:active { transform: none; }
}
