:root {
  --rail: 1228px;
  --week-cell-size: 12px;
  --week-gap: 3px;
  --decade-row-size: 16px;
  --life-grid-rows: repeat(9, var(--week-cell-size)) var(--decade-row-size) repeat(9, var(--week-cell-size)) var(--decade-row-size) repeat(9, var(--week-cell-size)) var(--decade-row-size) repeat(9, var(--week-cell-size)) var(--decade-row-size) repeat(9, var(--week-cell-size)) var(--decade-row-size) repeat(9, var(--week-cell-size)) var(--decade-row-size) repeat(9, var(--week-cell-size)) var(--decade-row-size) repeat(9, var(--week-cell-size)) var(--decade-row-size) repeat(9, var(--week-cell-size)) var(--decade-row-size) repeat(10, var(--week-cell-size));
  color: #171614;
  background: #f6f4ec;
  font-family: "Avenir Next", Avenir, "Gill Sans", "Trebuchet MS", sans-serif;
  font-variant-numeric: tabular-nums;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #f6f4ec;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.page-shell {
  width: min(100%, 1380px);
  margin: 0 auto;
  padding: 34px clamp(16px, 3vw, 46px) 52px;
}

.life-panel {
  display: grid;
  gap: 18px;
}

.hero {
  width: min(100%, var(--rail));
  margin: 0 auto;
  padding-bottom: 24px;
  border-bottom: 1px solid #ded8c8;
  text-align: left;
}

.eyebrow,
.chart-kicker {
  margin: 0 0 8px;
  color: #8a8780;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: #11110f;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(44px, 5vw, 72px);
  line-height: 0.94;
}

.subtitle {
  max-width: 690px;
  margin: 16px 0 0;
  color: #5d5a54;
  font-size: 17px;
  line-height: 1.55;
}

.mode-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  width: min(100%, var(--rail));
  margin: 0 auto;
  border: 1px solid #d8d2c4;
  background: #d8d2c4;
}

.mode-choice {
  display: grid;
  gap: 5px;
  min-height: 74px;
  border: 0;
  border-radius: 0;
  padding: 15px 18px 14px;
  background: #f6f4ec;
  color: #34312c;
  cursor: pointer;
  text-align: left;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.mode-choice span {
  color: inherit;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  line-height: 1;
}

.mode-choice small {
  color: #756f65;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mode-choice:hover {
  background: #fffdf8;
}

.mode-choice.is-selected {
  background: #171614;
  color: #fffaf0;
}

.mode-choice.is-selected small {
  color: #d9d0bf;
}

.mode-choice:focus-visible {
  outline: 2px solid #11110f;
  outline-offset: 3px;
}

.mode-panel {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: 12px 24px;
  width: min(100%, var(--rail));
  margin: 0 auto;
  padding: 18px 0;
  border-top: 1px solid #e1dccd;
}

.personal-panel {
  grid-template-columns: 1fr;
  gap: 12px;
}

.mode-panel__intro {
  min-width: 0;
  padding-top: 3px;
}

.mode-panel__intro h2 {
  font-size: 25px;
  line-height: 1.1;
}

.personal-controls {
  display: grid;
  grid-template-columns: minmax(260px, 340px) auto auto;
  align-items: center;
  justify-content: start;
  gap: 10px;
  min-width: 0;
}

.mode-status {
  grid-column: 1;
  min-height: 18px;
  color: #7d786f;
  font-size: 12px;
  font-weight: 750;
}

.mode-status.is-error {
  color: #8f2d1f;
}

.profile-panel .controls,
.profile-panel .ai-builder,
.profile-panel .skill-pack {
  width: 100%;
  margin: 0;
}

.profile-panel .controls {
  grid-column: 2;
}

.profile-panel .ai-builder,
.profile-panel .skill-pack {
  grid-column: 1 / -1;
}

.controls {
  display: grid;
  grid-template-columns: minmax(260px, 340px) auto auto;
  align-items: center;
  justify-content: start;
  gap: 10px;
  width: min(100%, var(--rail));
  margin: 0 auto;
}

.date-field,
.select-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 6px 8px 6px 14px;
  border: 1px solid #cfcbc0;
  border-radius: 8px;
  background: #fffdf8;
  color: #5f5a50;
  font-size: 14px;
  font-weight: 500;
}

.date-field span,
.select-field span,
.event-copy-field span {
  white-space: nowrap;
}

.date-field input,
.select-field select {
  min-width: 0;
  width: 100%;
  min-height: 34px;
  border: 0;
  border-left: 1px solid #ddd8cc;
  padding-left: 10px;
  background: transparent;
  color: #171614;
}

.primary-action,
.secondary-action {
  min-height: 46px;
  border-radius: 8px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 600;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.primary-action {
  border: 1px solid #151412;
  background: #151412;
  color: #fffaf0;
}

.secondary-action {
  border: 1px solid #cfc9bd;
  background: #fffdf8;
  color: #2f2d29;
}

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-1px);
}

.insight-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 18px;
  width: min(100%, var(--rail));
  margin: -4px auto 0;
  color: #69655d;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}

.profile-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  width: min(100%, var(--rail));
  margin: 0 auto;
  border-top: 1px solid #ded8c8;
  border-bottom: 1px solid #ded8c8;
  background: #ded8c8;
}

.profile-summary article {
  min-height: 112px;
  padding: 15px 16px;
  background: #f6f4ec;
}

.profile-summary p,
.profile-summary span {
  margin: 0;
  color: #706b62;
  font-size: 13px;
  font-weight: 650;
}

.profile-summary strong {
  display: block;
  margin: 7px 0 8px;
  color: #1b1a17;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 500;
  line-height: 1.05;
}

.collapsible-section {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: 12px 24px;
  width: min(100%, var(--rail));
  margin: 0 auto;
  padding: 18px 0;
  border-top: 1px solid #e1dccd;
}

.section-toggle {
  grid-column: 1;
  min-width: 0;
  padding-top: 3px;
  cursor: pointer;
  list-style-position: inside;
}

.section-toggle:focus-visible {
  outline: 2px solid #11110f;
  outline-offset: 4px;
}

.section-toggle__title {
  display: block;
  color: #1b1a17;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 500;
  line-height: 1.1;
}

.section-toggle__copy {
  display: block;
  max-width: 670px;
  margin-top: 9px;
  color: #69655d;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.ai-builder__body {
  display: grid;
  grid-column: 2;
  gap: 10px;
  min-width: 0;
}

.ai-builder__controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  min-width: 0;
}

.ai-name-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 6px 8px 6px 14px;
  border: 1px solid #cfcbc0;
  border-radius: 8px;
  background: #fffdf8;
  color: #5f5a50;
  font-size: 14px;
  font-weight: 500;
}

.ai-name-field span,
.ai-textarea-field span {
  white-space: nowrap;
}

.ai-name-field input {
  min-width: 0;
  width: 100%;
  min-height: 34px;
  border: 0;
  border-left: 1px solid #ddd8cc;
  padding-left: 10px;
  background: transparent;
  color: #171614;
}

.ai-builder__textareas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.ai-textarea-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #706b62;
  font-size: 13px;
  font-weight: 650;
}

.ai-textarea-field textarea {
  width: 100%;
  min-height: 226px;
  border: 1px solid #cfcbc0;
  border-radius: 8px;
  padding: 12px 13px;
  resize: vertical;
  background: #fffdf8;
  color: #171614;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}

.ai-textarea-field--large textarea {
  min-height: 226px;
}

.ai-builder__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
}

.ai-builder__footer [data-ai-profile-status] {
  color: #8f2d1f;
  font-size: 12px;
  font-weight: 750;
}

.ai-builder__footer [data-ai-profile-status].is-success {
  color: #2f6f42;
}

.skill-pack__body {
  display: grid;
  grid-column: 2;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

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

.skill-actions .secondary-action,
.skill-copy-actions .secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  text-decoration: none;
}

.skill-copy-page {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 34px clamp(16px, 3vw, 46px) 52px;
}

.skill-copy-hero {
  padding-bottom: 22px;
  border-bottom: 1px solid #ded8c8;
}

.skill-copy-hero h1 {
  max-width: 820px;
}

.skill-copy-actions {
  justify-content: flex-start;
  margin-top: 22px;
}

.skill-copy-panel {
  padding-top: 18px;
}

.skill-copy-panel pre {
  max-height: 68vh;
  margin: 0;
  overflow: auto;
  border: 1px solid #d8d2c4;
  border-radius: 8px;
  padding: 16px;
  background: #fffdf8;
  color: #171614;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.event-composer {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 10px;
  width: min(100%, var(--rail));
  margin: 0 auto;
  padding: 6px 0 2px;
}

.event-composer__intro {
  min-width: 0;
  padding-top: 3px;
}

.event-composer__intro h2 {
  font-size: 24px;
  line-height: 1.1;
}

.event-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 10px;
  align-items: stretch;
  min-width: 0;
}

.event-date-field {
  grid-column: 1 / -1;
  width: min(100%, 360px);
}

.event-copy-field {
  grid-column: 1;
}

.event-controls .secondary-action {
  grid-column: 2;
}

.event-composer .date-field,
.event-copy-field,
.event-controls .secondary-action {
  min-height: 48px;
  height: 48px;
}

.event-composer .date-field,
.event-copy-field {
  padding: 6px 10px 6px 14px;
}

.event-composer .date-field span,
.event-copy-field span {
  display: flex;
  flex: 0 0 92px;
  align-items: center;
  height: 34px;
  color: #706b62;
  font-size: 13px;
  font-weight: 650;
}

.event-date-field input {
  min-width: 0;
  padding-right: 4px;
}

.event-copy-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 6px 6px 6px 14px;
  border: 1px solid #cfcbc0;
  border-radius: 8px;
  background: #fffdf8;
  color: #5f5a50;
  font-size: 14px;
  font-weight: 500;
}

.event-copy-field textarea {
  width: 100%;
  height: 34px;
  min-height: 34px;
  border: 0;
  border-left: 1px solid #ddd8cc;
  padding: 8px 0 6px 12px;
  resize: none;
  background: transparent;
  color: #171614;
  line-height: 1.3;
  overflow: hidden;
}

.event-copy-field textarea::placeholder {
  color: #9a958c;
}

.event-copy-field textarea:focus,
.ai-name-field input:focus,
.ai-textarea-field textarea:focus,
.date-field input:focus,
.select-field select:focus {
  outline: none;
}

.ai-name-field:focus-within,
.ai-textarea-field textarea:focus,
.date-field:focus-within,
.select-field:focus-within,
.event-copy-field:focus-within {
  border-color: #171614;
  box-shadow: 0 0 0 2px rgba(23, 22, 20, 0.08);
}

.event-controls .secondary-action {
  width: 100%;
  padding: 0 14px;
  white-space: nowrap;
}

.event-feedback {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 18px;
  color: #7d786f;
  font-size: 12px;
  font-weight: 700;
}

.event-feedback [data-event-error] {
  color: #8f2d1f;
}

.event-feedback [data-event-error].is-success {
  color: #2f6f42;
}

.chart-card {
  width: 100%;
  padding: 8px 0 0;
  overflow-x: auto;
}

.chart-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, auto);
  align-items: end;
  gap: 24px;
  width: var(--rail);
  margin: 0 auto 18px;
  text-align: left;
}

.chart-heading h2 {
  font-size: 42px;
  line-height: 0.98;
}

.chart-heading p:last-child {
  margin: 0;
  color: #908c84;
  font-size: 15px;
  line-height: 1.45;
  text-align: right;
}

.annotation-stage {
  position: relative;
  width: 1228px;
  min-height: 1497px;
  margin: 0 auto;
}

.chart-card:not(.has-events) .annotation-stage {
  width: max-content;
  min-height: auto;
}

.grid-wrap {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  width: max-content;
  margin: 0;
}

.age-axis {
  display: grid;
  grid-template-rows: var(--life-grid-rows);
  gap: var(--week-gap);
  color: #8c887f;
  font-size: 10px;
  font-weight: 600;
  line-height: var(--week-cell-size);
  text-align: right;
}

.life-grid {
  display: grid;
  grid-template-columns: repeat(52, var(--week-cell-size));
  grid-template-rows: var(--life-grid-rows);
  gap: var(--week-gap);
}

.week-cell {
  width: var(--week-cell-size);
  height: var(--week-cell-size);
  border: 0;
  border-radius: 2px;
  padding: 0;
  background: #ddd8cc80;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
}

.week-cell.is-lived {
  background: var(--stage-filled);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.34),
    0 0 8px rgba(33, 32, 28, 0.08);
}

.week-cell.has-event,
.week-cell.has-event-range {
  position: relative;
  transform-origin: center;
  will-change: transform;
}

.week-cell.has-event {
  box-shadow:
    inset 0 0 0 2px #11110f,
    0 0 0 2px #fffdf8,
    0 0 12px rgba(17, 17, 15, 0.28);
}

.week-cell.has-event::after {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--event-color, #11110f);
  content: "";
}

.week-cell.has-event::before,
.week-cell.has-event-range::before {
  position: absolute;
  inset: -4px;
  border: 2px solid var(--active-event-color, var(--event-color, #11110f));
  border-radius: 5px;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.82);
  content: "";
}

.week-cell.is-event-active {
  position: relative;
  z-index: 3;
  animation: event-square-pulse 760ms ease-out both;
}

.week-cell.is-event-active::before {
  animation: event-square-ring 760ms ease-out both;
}

.week-cell.has-event-range.is-event-active::after {
  position: absolute;
  inset: 3px;
  border-radius: 2px;
  background: var(--active-event-color, var(--event-color, #11110f));
  content: "";
}

@keyframes event-square-pulse {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  46% {
    transform: translate3d(0, -1px, 0) scale(1.35);
  }

  100% {
    transform: translate3d(0, -1px, 0) scale(1.18);
  }
}

@keyframes event-square-ring {
  0% {
    opacity: 0.55;
    transform: scale(0.72);
  }

  52% {
    opacity: 0.95;
    transform: scale(1.18);
  }

  100% {
    opacity: 0.88;
    transform: scale(1);
  }
}

.week-cell:focus-visible {
  outline: 2px solid #11110f;
  outline-offset: 1px;
}

.event-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.event-line {
  fill: none;
  stroke: var(--event-color, rgba(22, 21, 18, 0.78));
  stroke-linecap: round;
  stroke-width: 1.2;
  transition: stroke-opacity 160ms ease;
  vector-effect: non-scaling-stroke;
}

.event-line.is-event-active {
  stroke-opacity: 0.96;
}

.event-line--range {
  stroke-opacity: 0.6;
}

.event-range-marker {
  fill: none;
  stroke: var(--event-color, rgba(22, 21, 18, 0.78));
  stroke-linecap: round;
  stroke-width: 2.4;
  opacity: 0.82;
  transition: opacity 160ms ease;
  vector-effect: non-scaling-stroke;
}

.event-range-marker.is-event-active {
  opacity: 1;
}

.event-range-marker--year,
.event-range-marker--age {
  stroke-dasharray: 4 4;
}

.event-range-marker--month {
  stroke-width: 2.8;
}

.event-line-dot {
  fill: var(--event-color, #161512);
  stroke: #fffdf8;
  stroke-width: 1.4;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 160ms ease;
}

.event-range-anchor {
  fill: #fffdf8;
  stroke: var(--event-color, #161512);
  stroke-width: 2.2;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 160ms ease;
}

.event-line-dot.is-event-active,
.event-range-anchor.is-event-active {
  transform: scale(1.18);
}

.event-notes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.event-note {
  position: absolute;
  width: 366px;
  min-height: 54px;
  padding: 8px 11px 9px 13px;
  border-left: 3px solid var(--event-color, #161512);
  background: rgba(255, 253, 248, 0.93);
  color: #272520;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.22;
  overflow-wrap: anywhere;
  pointer-events: auto;
  box-shadow: 0 8px 16px rgba(39, 36, 29, 0.06);
  contain: paint;
  transform: translateZ(0);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
  will-change: transform;
}

.event-note:hover,
.event-note:focus-visible,
.event-note.is-event-active {
  border-left-color: var(--active-event-color, var(--event-color, #161512));
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 18px 34px rgba(39, 36, 29, 0.16);
  transform: translate3d(0, -4px, 0);
}

.event-note:focus-visible {
  outline: 2px solid #11110f;
  outline-offset: 3px;
}

.event-note--range {
  background: rgba(255, 253, 248, 0.88);
}

.event-note time {
  display: block;
  margin-bottom: 3px;
  color: #777269;
  font-family: "Avenir Next", Avenir, "Gill Sans", "Trebuchet MS", sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 300px));
  justify-content: center;
  gap: 13px 26px;
  width: var(--rail);
  min-width: 760px;
  margin: 24px auto 0;
  color: #6a665f;
  font-size: 14px;
  font-weight: 500;
}

.chart-card:not(.has-events) .legend,
.chart-card:not(.has-events) .source-note {
  width: min(100%, 820px);
  min-width: 0;
}

.legend-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
}

.legend-item i {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border-radius: 3px;
  background: var(--stage-filled);
}

.legend-item strong,
.legend-item small {
  display: block;
}

.legend-item strong {
  color: #2c2a26;
  font-weight: 750;
}

.legend-item small {
  margin-top: 2px;
  color: #756f65;
  font-size: 12px;
}

.source-note {
  width: var(--rail);
  margin: 18px auto 0;
  color: #7d786f;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

@media (max-width: 760px) {
  :root {
    --week-cell-size: 5.5px;
    --week-gap: 1px;
    --decade-row-size: 7.5px;
  }

  .page-shell {
    width: 100vw;
    max-width: 100vw;
    padding: 22px 12px 40px;
    overflow-x: hidden;
  }

  .life-panel {
    gap: 16px;
    max-width: 100%;
    overflow-x: hidden;
  }

  .hero {
    width: 100%;
    padding-bottom: 18px;
  }

  .mode-selector {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .mode-choice {
    min-height: 66px;
    padding: 13px 14px;
  }

  .mode-choice span {
    font-size: 22px;
  }

  .mode-panel {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 10px;
    padding: 15px 0;
  }

  .mode-panel__intro {
    padding-top: 0;
  }

  .mode-panel__intro h2 {
    font-size: 24px;
  }

  .personal-controls,
  .profile-panel .controls {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .mode-status,
  .profile-panel .controls,
  .profile-panel .ai-builder,
  .profile-panel .skill-pack {
    grid-column: auto;
  }

  h1 {
    font-size: 34px;
    line-height: 1.02;
    overflow-wrap: break-word;
  }

  .subtitle {
    max-width: none;
    font-size: 16px;
    overflow-wrap: anywhere;
  }

  .controls,
  .profile-summary,
  .collapsible-section {
    grid-template-columns: 1fr;
    align-items: stretch;
    width: 100%;
  }

  .insight-strip {
    width: 100%;
    justify-content: start;
  }

  .insight-strip span,
  .profile-summary span,
  .profile-summary strong,
  .section-toggle__title,
  .section-toggle__copy,
  .event-composer__intro h2,
  .chart-heading h2,
  .chart-heading p {
    overflow-wrap: anywhere;
  }

  .profile-summary article {
    min-height: 92px;
  }

  .collapsible-section {
    gap: 10px;
    padding: 15px 0;
  }

  .section-toggle,
  .ai-builder__body,
  .skill-pack__body {
    grid-column: auto;
  }

  .ai-builder__controls,
  .ai-builder__textareas {
    grid-template-columns: 1fr;
  }

  .ai-builder__footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .skill-pack {
    gap: 12px;
    padding: 15px 0;
  }

  .skill-pack__body {
    grid-template-columns: 1fr;
  }

  .skill-actions,
  .skill-copy-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .event-composer {
    grid-template-columns: 1fr;
    align-items: stretch;
    width: 100%;
    padding-bottom: 0;
    gap: 10px;
  }

  .event-composer__intro {
    grid-row: auto;
    min-width: 0;
    padding-top: 0;
  }

  .event-controls {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .event-date-field,
  .event-copy-field,
  .event-controls .secondary-action {
    grid-column: auto;
    width: 100%;
  }

  .event-feedback {
    grid-column: auto;
  }

  .date-field,
  .select-field,
  .ai-name-field,
  .event-copy-field,
  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .date-field,
  .select-field,
  .ai-name-field {
    justify-content: space-between;
  }

  .date-field input,
  .select-field select,
  .ai-name-field input {
    width: 100%;
  }

  .ai-textarea-field textarea {
    min-height: 220px;
  }

  .ai-textarea-field--large textarea {
    min-height: 220px;
  }

  .event-composer .date-field span,
  .event-copy-field span {
    flex-basis: 86px;
  }

  .chart-card {
    width: 100%;
    padding-inline: 0;
  }

  .annotation-stage {
    width: 370px;
    min-height: 649px;
    margin-left: 0;
  }

  .chart-card:not(.has-events) .annotation-stage {
    width: max-content;
    margin-right: auto;
    margin-left: auto;
  }

  .grid-wrap {
    grid-template-columns: 20px 1fr;
    gap: 5px;
  }

  .age-axis {
    font-size: 7px;
  }

  .life-grid {
    grid-template-columns: repeat(52, var(--week-cell-size));
  }

  .week-cell {
    border-radius: 1px;
  }

  .week-cell.has-event::after {
    inset: 1px;
  }

  .event-line {
    stroke-opacity: 0.44;
    stroke-width: 0.8;
  }

  .event-range-marker {
    stroke-width: 1.4;
  }

  .event-range-anchor {
    stroke-width: 1.4;
  }

  .chart-heading {
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    min-width: 0;
    margin-left: 0;
  }

  .chart-heading h2 {
    font-size: 36px;
  }

  .chart-heading p:last-child {
    font-size: 14px;
    line-height: 1.35;
    text-align: left;
  }

  .legend {
    grid-template-columns: 1fr;
    justify-content: stretch;
    min-width: 0;
    width: 100%;
    font-size: 12px;
  }

  .chart-card:not(.has-events) .legend,
  .chart-card:not(.has-events) .source-note {
    width: 100%;
  }

  .event-note {
    width: 330px;
    background: rgba(255, 253, 248, 0.94);
  }

  .source-note {
    width: 100%;
  }

  .skill-copy-page {
    width: 100vw;
    max-width: 100vw;
    padding: 22px 12px 40px;
  }

  .skill-copy-panel pre {
    max-height: none;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
