:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  --page: #f4f1e8;
  --surface: #fffefa;
  --surface-soft: #ebe7db;
  --surface-green: #e4eee9;
  --text: #151515;
  --muted: #68665f;
  --line: rgb(21 21 21 / 12%);
  --green: #1f6f5c;
  --green-dark: #145142;
  --green-soft: #d7e8df;
  --orange: #ff5b35;
  --orange-soft: #ffe1d8;
  --blue-soft: #e1ebf7;
  --focus: #0759c7;
  --danger: #a5311c;
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 14px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --shadow:
    0 0 0 1px rgb(21 21 21 / 6%),
    0 3px 9px -5px rgb(21 21 21 / 16%),
    0 24px 60px rgb(21 21 21 / 7%);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 0;
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 82% 8%, rgb(31 111 92 / 8%), transparent 28rem),
    var(--page);
}

button,
input,
select {
  font: inherit;
}

button,
summary,
select,
input[type="radio"] {
  cursor: pointer;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

h2[tabindex="-1"]:focus {
  outline: none;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  min-height: 44px;
  padding: 12px 16px;
  border-radius: 12px;
  color: white;
  background: var(--text);
  transform: translateY(-150%);
  transition-property: transform;
  transition-duration: 150ms;
  transition-timing-function: var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-header,
main,
.app-footer {
  width: min(100% - 40px, 1080px);
  margin-inline: auto;
}

.app-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  text-decoration: none;
}

.brand-jai {
  font-size: 21px;
  font-weight: 760;
  letter-spacing: -0.05em;
}

.brand-path {
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.25;
}

.brand-product {
  color: var(--green-dark);
  font-size: 15px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.intro {
  max-width: 860px;
  padding: clamp(28px, 5vw, 58px) 0 clamp(28px, 4vw, 46px);
}

.eyebrow,
.step-label,
.section-kicker {
  margin: 0 0 14px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(40px, 6.2vw, 72px);
  font-weight: 690;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.intro-copy {
  max-width: 710px;
  margin: 20px 0 0;
  color: #3f3e39;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.5;
}

.privacy-note {
  margin: 15px 0 0;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 680;
}

.install-entry {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.install-entry[hidden],
.install-help[hidden] {
  display: none !important;
}

.install-entry p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.install-entry .install-button {
  background: var(--surface-green);
}

.install-help {
  max-width: 710px;
  margin-top: 12px;
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
}

.install-help summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 690;
  list-style: none;
}

.install-help summary::-webkit-details-marker {
  display: none;
}

.install-help summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 420;
  transition: transform 160ms var(--ease);
}

.install-help[open] summary::after {
  transform: rotate(45deg);
}

.install-help > div {
  padding: 0 16px 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.install-help p {
  margin: 0;
}

.planner {
  margin-bottom: 28px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.steps li {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--muted);
  background: rgb(255 254 250 / 55%);
  font-size: 14px;
  font-weight: 650;
}

.steps li:first-child {
  border-radius: 16px 0 0 16px;
}

.steps li:last-child {
  border-radius: 0 16px 16px 0;
}

.steps li span {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-soft);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.steps li.is-current,
.steps li.is-complete {
  color: var(--text);
}

.steps li.is-current span {
  color: white;
  background: var(--green);
}

.steps li.is-complete span {
  color: var(--green-dark);
  background: var(--green-soft);
}

.panel {
  padding: clamp(24px, 5vw, 56px);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: panel-in 240ms var(--ease) both;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-heading,
.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  align-items: end;
  gap: clamp(24px, 5vw, 70px);
}

.panel-heading {
  padding-bottom: 32px;
}

.panel-heading h2,
.result-hero h2 {
  margin: 0;
  font-size: clamp(31px, 4.8vw, 54px);
  font-weight: 690;
  letter-spacing: -0.055em;
  line-height: 1.03;
}

.panel-heading > p,
.section-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 560px);
  gap: 14px;
  margin-bottom: 30px;
}

.choice-field,
.select-field {
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
}

.choice-title,
.select-field > span {
  display: block;
  margin-bottom: 12px;
  padding: 0;
  font-size: 13px;
  font-weight: 720;
}

.choice-title {
  margin-top: 0;
}

.choice-options {
  display: grid;
  gap: 0;
}

.choice-field label {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
}

.choice-field input {
  width: 19px;
  height: 19px;
  accent-color: var(--green);
}

.select-field select,
.add-form select,
.add-form input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}

.select-field small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  line-height: 1.4;
}

.activity-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 4px 14px;
}

.activity-heading strong {
  color: var(--text);
}

.activity-heading h3,
.section-heading h3 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 680;
  letter-spacing: -0.035em;
}

.activity-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.week-total {
  flex: 0 0 auto;
  min-width: 140px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.week-total strong {
  display: block;
  font-size: 21px;
  letter-spacing: -0.035em;
}

.week-total span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.week-total.is-over strong,
.week-total.is-over span {
  color: var(--danger);
}

.counting-note {
  margin: 0 4px 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.activity-list {
  display: grid;
  gap: 16px;
}

.remainder-card {
  min-height: 92px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px rgb(21 21 21 / 5%);
}

.remainder-card.is-desired {
  background: var(--surface-green);
}

.remainder-card strong,
.remainder-card p {
  margin: 0;
}

.remainder-card strong {
  font-size: 15px;
}

.remainder-card p {
  max-width: 680px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.remainder-card > span {
  color: var(--green-dark);
  font-size: 24px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.activity-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 0 5px 9px;
}

.activity-group-heading h4,
.activity-group-heading p {
  margin: 0;
}

.activity-group-heading h4 {
  font-size: 14px;
  font-weight: 760;
}

.activity-group-heading p {
  color: var(--muted);
  font-size: 12px;
}

.activity-group-list {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px rgb(21 21 21 / 5%);
}

.activity-row {
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 13px 16px 13px 20px;
}

.activity-group-list .activity-row + .activity-row {
  border-top: 1px solid var(--line);
}

.activity-main {
  min-width: 0;
}

.activity-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 16px;
  font-weight: 680;
}

.activity-kind {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: rgb(255 254 250 / 78%);
  font-size: 11px;
  font-weight: 620;
}

.activity-previous {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.activity-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.stepper-button,
.remove-button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: var(--text);
  background: transparent;
  box-shadow: none;
  font-size: 20px;
  transition-property: background-color, box-shadow, scale;
  transition-duration: 140ms;
  transition-timing-function: var(--ease);
}

.stepper-button:hover,
.remove-button:hover {
  background: rgb(255 254 250 / 72%);
  box-shadow: 0 0 0 1px rgb(21 21 21 / 14%);
}

.stepper-button:active,
.remove-button:active,
.primary-button:active,
.secondary-button:active,
.quiet-button:active,
.danger-button:active {
  scale: 0.96;
}

.hours-input {
  width: 82px;
  min-height: 44px;
  padding: 8px 8px;
  border: 0;
  border-radius: 11px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
  font-size: 17px;
  font-weight: 720;
  text-align: center;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  transition-property: box-shadow, background-color;
  transition-duration: 140ms;
  transition-timing-function: var(--ease);
}

.hours-input:hover,
.hours-input:focus {
  background: white;
  box-shadow: 0 0 0 1px rgb(21 21 21 / 28%);
}

.hours-input::-webkit-outer-spin-button,
.hours-input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.remove-button {
  margin-left: 3px;
  color: var(--danger);
  font-size: 15px;
}

.add-activity,
.footnotes details {
  margin-top: 14px;
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
}

.add-activity summary,
.footnotes summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  font-weight: 680;
  list-style: none;
}

.add-activity summary::-webkit-details-marker,
.footnotes summary::-webkit-details-marker {
  display: none;
}

.add-activity summary::after,
.footnotes summary::after {
  content: "+";
  font-size: 21px;
  font-weight: 420;
  transition-property: transform;
  transition-duration: 160ms;
  transition-timing-function: var(--ease);
}

.add-activity[open] summary::after,
.footnotes details[open] summary::after {
  transform: rotate(45deg);
}

.add-form {
  display: grid;
  grid-template-columns: minmax(160px, 1.3fr) minmax(180px, 1fr) minmax(120px, 0.6fr) auto;
  align-items: end;
  gap: 12px;
  padding: 4px 18px 18px;
}

.add-form label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.panel-actions,
.result-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  padding-top: 32px;
}

.result-actions {
  justify-content: flex-start;
  padding-top: 24px;
}

.result-secondary-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 14px;
}

.panel-actions > p {
  max-width: 420px;
  margin: 0 auto 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.primary-button,
.secondary-button,
.quiet-button,
.danger-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 17px;
  border: 0;
  border-radius: 13px;
  font-weight: 700;
  transition-property: color, background-color, box-shadow, scale;
  transition-duration: 150ms;
  transition-timing-function: var(--ease);
}

.primary-button:disabled,
.secondary-button:disabled,
.quiet-button:disabled,
.danger-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.primary-button {
  color: white;
  background: var(--text);
  box-shadow: 0 7px 18px rgb(21 21 21 / 15%);
}

.primary-button:hover {
  background: var(--green-dark);
  box-shadow: 0 9px 22px rgb(20 81 66 / 22%);
}

.secondary-button,
.quiet-button {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}

.secondary-button:hover,
.quiet-button:hover {
  box-shadow: 0 0 0 1px rgb(21 21 21 / 25%);
}

.danger-button {
  margin-top: 12px;
  color: var(--danger);
  background: var(--orange-soft);
}

.install-button {
  flex: 0 0 auto;
}

.result-hero {
  max-width: 760px;
  padding-bottom: 32px;
}

.result-hero > p:last-child {
  max-width: 660px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.week-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
}

.week-card.is-desired {
  background: var(--surface-green);
}

.week-card.is-over {
  background: var(--orange-soft);
}

.week-card-label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.week-card-total {
  margin: 8px 0 18px;
  font-size: clamp(31px, 5vw, 48px);
  font-weight: 710;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
}

.week-bar {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(21 21 21 / 10%);
}

.week-bar span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--green);
  transform-origin: left center;
  transition-property: width, background-color;
  transition-duration: 280ms;
  transition-timing-function: var(--ease);
}

.week-card.is-over .week-bar span {
  background: var(--orange);
}

.week-card-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.changes-section,
.insights-section {
  padding-top: 54px;
}

.changes-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.change-row {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.change-row strong {
  font-size: 15px;
}

.change-delta {
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.change-delta.is-up {
  color: var(--green-dark);
}

.change-delta.is-down {
  color: #78543f;
}

.no-changes {
  grid-column: 1 / -1;
  margin: 0;
  padding: 20px;
  border-radius: var(--radius-md);
  color: var(--muted);
  background: var(--surface-soft);
}

.insights-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.more-insights {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.more-insights-summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 740;
  list-style: none;
}

.more-insights-summary::-webkit-details-marker {
  display: none;
}

.more-insights-summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  transition: transform 160ms var(--ease);
}

.more-insights[open] .more-insights-summary::after {
  transform: rotate(45deg);
}

.more-insights-list {
  display: grid;
  gap: 10px;
  padding: 0 10px 10px;
}

.insight {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
}

.insight.is-math {
  background: var(--orange-soft);
}

.insight.is-health {
  background: var(--blue-soft);
}

.insight-summary {
  min-width: 0;
  min-height: 76px;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 24px;
  gap: 22px;
  padding: 20px;
  list-style: none;
}

.insight-summary::-webkit-details-marker {
  display: none;
}

.insight-summary::after {
  content: "+";
  align-self: start;
  justify-self: end;
  font-size: 24px;
  font-weight: 380;
  transition-property: transform;
  transition-duration: 160ms;
  transition-timing-function: var(--ease);
}

.insight[open] .insight-summary::after {
  transform: rotate(45deg);
}

.insight-type {
  min-width: 0;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.insight h4 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.insight-copy {
  margin: 8px 0 0;
  color: #4f4d47;
  font-size: 14px;
  line-height: 1.55;
}

.insight-more {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 720;
}

.insight-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 20px 20px 172px;
}

.insight-detail {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgb(255 254 250 / 64%);
}

.insight-detail h5,
.insight-detail p {
  margin: 0;
}

.insight-detail h5 {
  font-size: 12px;
  font-weight: 770;
}

.insight-detail p {
  margin-top: 7px;
  color: #4f4d47;
  font-size: 13px;
  line-height: 1.55;
}

.source-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  grid-column: 1 / -1;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 690;
  text-underline-offset: 3px;
}

.research-age {
  max-width: 560px;
  display: block;
  margin-top: 20px;
}

.custom-classifier {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
  margin-top: 20px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface-green);
  box-shadow: inset 0 0 0 1px rgb(21 21 21 / 5%);
}

.custom-classifier h4,
.custom-classifier p {
  margin: 0;
}

.custom-classifier h4 {
  font-size: 18px;
  letter-spacing: -0.02em;
}

.custom-classifier > div:first-child > p:last-child {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.custom-domain-list {
  display: grid;
  gap: 8px;
}

.custom-domain-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(180px, 1.3fr);
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 7px 8px 7px 14px;
  border-radius: var(--radius-md);
  background: rgb(255 254 250 / 72%);
}

.custom-domain-row > span {
  min-width: 0;
  font-size: 14px;
  font-weight: 690;
  overflow-wrap: anywhere;
}

.custom-domain-row select {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 11px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}

.share-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 22px;
  margin-top: 54px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface-green);
  box-shadow: inset 0 0 0 1px rgb(21 21 21 / 5%);
}

.share-section h3,
.share-section p {
  margin: 0;
}

.share-section h3 {
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.035em;
}

.share-section > div:first-child > p:last-child {
  max-width: 590px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.share-message {
  grid-column: 1 / -1;
  min-height: 20px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 660;
}

.save-message {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--green-dark);
  text-align: right;
  font-size: 13px;
  font-weight: 650;
}

.footnotes {
  margin: 0 0 76px;
}

.footnotes details {
  background: rgb(255 254 250 / 58%);
}

.footnotes details > div {
  max-width: 760px;
  padding: 0 18px 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.footnotes p {
  margin: 0 0 8px;
}

.app-footer {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.app-footer p {
  margin: 0;
}

.app-footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 680;
  text-underline-offset: 3px;
}

@media (max-width: 760px) {
  .app-header,
  main,
  .app-footer {
    width: min(100% - 24px, 1080px);
  }

  .app-header {
    min-height: 66px;
  }

  .intro {
    padding: 10px 0 22px;
  }

  .intro .eyebrow {
    display: none;
  }

  h1 {
    font-size: clamp(34px, 9.8vw, 48px);
    line-height: 1;
  }

  .intro-copy {
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.42;
  }

  .privacy-note {
    margin-top: 10px;
    font-size: 12px;
  }

  .install-entry {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
  }

  .install-entry .install-button {
    width: 100%;
  }

  .steps li {
    min-height: 48px;
    gap: 6px;
    font-size: 11px;
  }

  .steps li span {
    font-size: 12px;
  }

  .panel {
    padding: 24px 14px 18px;
    border-radius: 24px;
  }

  .panel-heading,
  .section-heading,
  .setup-grid,
  .comparison {
    grid-template-columns: 1fr;
  }

  .panel-heading,
  .section-heading {
    gap: 14px;
  }

  .panel-heading {
    padding-inline: 4px;
    padding-bottom: 14px;
  }

  .panel-heading > p {
    display: none;
  }

  .panel-heading h2 {
    font-size: 30px;
  }

  .setup-grid {
    margin-bottom: 18px;
  }

  .choice-field {
    padding: 10px 12px;
  }

  .choice-title {
    margin-bottom: 2px;
  }

  .choice-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 8px;
  }

  .choice-field label {
    min-width: 0;
    font-size: 13px;
  }

  .activity-heading {
    align-items: start;
    position: sticky;
    top: 6px;
    z-index: 5;
    margin-inline: -6px;
    padding: 8px 10px 10px;
    border-radius: 16px;
    background: rgb(255 254 250 / 94%);
    box-shadow: 0 10px 22px rgb(21 21 21 / 7%);
    backdrop-filter: blur(10px);
  }

  .week-total {
    min-width: 94px;
  }

  .week-total strong {
    font-size: 18px;
  }

  .activity-heading h3 {
    font-size: 20px;
  }

  .activity-heading p {
    margin-top: 3px;
    font-size: 12px;
  }

  .counting-note {
    margin-bottom: 10px;
    font-size: 12px;
  }

  .activity-row {
    min-height: 92px;
    padding: 13px 10px 13px 14px;
    gap: 8px;
  }

  .activity-name {
    font-size: 14px;
  }

  .activity-kind {
    display: none;
  }

  .activity-controls {
    gap: 2px;
  }

  .stepper-button,
  .remove-button {
    width: 44px;
    height: 44px;
  }

  .hours-input {
    width: 68px;
    font-size: 16px;
  }

  .activity-group-heading {
    display: block;
    padding-inline: 4px;
  }

  .activity-group-heading p {
    margin-top: 3px;
  }

  .remainder-card {
    align-items: start;
    gap: 12px;
    padding: 16px;
  }

  .add-form {
    grid-template-columns: 1fr;
  }

  .panel-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .result-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-actions > p {
    margin: 0;
  }

  .panel-actions .primary-button,
  .panel-actions .quiet-button,
  .result-actions .primary-button,
  .result-actions .quiet-button {
    width: 100%;
  }

  .result-secondary-actions .quiet-button {
    width: 100%;
  }

  .changes-list {
    grid-template-columns: 1fr;
  }

  .insight {
    display: block;
  }

  .insight-summary {
    grid-template-columns: 1fr 24px;
    gap: 8px 12px;
    padding: 18px 16px;
  }

  .insight-type {
    grid-column: 1 / -1;
  }

  .insight-content {
    grid-template-columns: 1fr;
    padding: 0 16px 16px;
  }

  .custom-classifier,
  .share-section {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .custom-classifier {
    padding: 16px;
  }

  .custom-domain-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 10px;
  }

  .share-actions {
    justify-content: stretch;
  }

  .share-actions .secondary-button,
  .share-actions .quiet-button {
    width: 100%;
  }

  .result-actions {
    padding-top: 28px;
  }

  .save-message {
    text-align: left;
  }

  .app-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 390px) {
  .activity-row {
    grid-template-columns: minmax(86px, 1fr) auto;
  }

  .hours-input {
    width: 64px;
  }
}

@media (max-width: 320px) {
  .app-header,
  main,
  .app-footer {
    width: min(100% - 16px, 1080px);
  }

  .app-header {
    gap: 8px;
  }

  h1 {
    font-size: clamp(34px, 16vw, 46px);
  }

  .panel {
    padding-inline: 10px;
  }

  .steps li {
    min-width: 0;
    flex-direction: column;
    gap: 3px;
    padding: 4px 2px;
    line-height: 1;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .activity-heading {
    display: block;
  }

  .week-total {
    margin-top: 12px;
    text-align: left;
  }

  .activity-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .activity-controls {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .panel,
  .activity-list,
  .activity-group-list,
  .remainder-card,
  .choice-field,
  .select-field,
  .custom-classifier,
  .custom-domain-row,
  .week-card,
  .change-row,
  .insight,
  .more-insights,
  .share-section,
  .add-activity,
  .footnotes details {
    border: 1px solid CanvasText;
  }

  .week-bar span {
    background: Highlight;
  }
}
