.rhythm-app {
  --r-paper: #fafaf7;
  --r-line: #d1d9cc;
  --r-green: #344833;
  --r-muted: #586353;
  max-width: 1280px;
  margin: 0 auto;
  color: #25362b;
  font-family: "Instrument Sans", sans-serif;
}
.rhythm-app * {
  box-sizing: border-box;
}
.rhythm-app :is(h1, h2),
.rhythm-app h3 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.08;
}
.rhythm-app :is(h1, h2) {
  font-size: clamp(36px, 5vw, 64px);
  margin: 12px 0 22px;
}
.rhythm-app h3 {
  font-size: 27px;
  margin: 0 0 12px;
}
.rhythm-app p {
  line-height: 1.6;
  max-width: 65ch;
}
.rhythm-app .r-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 650;
  color: var(--r-muted);
}
.rhythm-app .r-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.rhythm-app .r-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  border-bottom: 1px solid var(--r-line);
  padding-bottom: 12px;
  margin-bottom: 28px;
}
.rhythm-app button {
  min-height: 44px;
  border: 1px solid var(--r-line);
  border-radius: 8px;
  background: transparent;
  color: #25362b;
  padding: 10px 16px;
  font: inherit;
  cursor: pointer;
  letter-spacing: 0;
  text-transform: none;
}
.rhythm-app button:hover {
  background: #e6ecdf;
}
.rhythm-app button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.rhythm-app button[aria-pressed="true"],
.rhythm-app .r-primary {
  background: var(--r-green);
  color: white;
  border-color: var(--r-green);
}
.rhythm-app :focus-visible {
  outline: 3px solid #92722c;
  outline-offset: 4px;
}
.rhythm-app .r-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}
.rhythm-app .r-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 24px;
}
.rhythm-app .r-card {
  background: var(--r-paper);
  border: 1px solid var(--r-line);
  border-radius: 14px;
  padding: 28px;
  min-width: 0;
}
.rhythm-app .r-card--sage {
  background: #e4ebdc;
}
.rhythm-app .r-card--night {
  background: #26372f;
  color: #f7f2e7;
  border-color: #26372f;
}
.rhythm-app .r-card--night .r-label {
  color: #d0dbc6;
}
.rhythm-app .r-card--night button {
  color: #f7f2e7;
}
.rhythm-app .r-card--night button:hover {
  background: #3e5547;
}
.rhythm-app .r-list {
  display: grid;
  gap: 0;
}
.rhythm-app .r-event {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid var(--r-line);
  align-items: start;
}
.rhythm-app .r-event:last-child {
  border: 0;
}
.rhythm-app .r-event time {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  padding-top: 5px;
}
.rhythm-app .r-event h3 {
  font-size: 23px;
  margin: 0 0 5px;
}
.rhythm-app .r-event p {
  font-size: 14px;
  margin: 0;
}
.rhythm-app .r-small {
  font-size: 13px;
  color: var(--r-muted);
}
.rhythm-app .r-tag {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 8px;
  border: 1px solid var(--r-line);
  border-radius: 20px;
}
.rhythm-app .r-empty {
  padding: 35px 0;
  font-size: 18px;
}
.rhythm-app label {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  font-size: 14px;
}
.rhythm-app input,
.rhythm-app select,
.rhythm-app textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #a9b4a2;
  border-radius: 7px;
  background: #fffefb;
  color: #25362b;
  font: inherit;
  min-height: 46px;
}
.rhythm-app textarea {
  min-height: 96px;
  resize: vertical;
}
.rhythm-app fieldset {
  border: 0;
  padding: 0;
  margin: 20px 0;
}
.rhythm-app legend {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.rhythm-app .r-check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rhythm-app .r-check input {
  width: 18px;
  min-height: 18px;
  height: 18px;
}
.rhythm-app .r-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.rhythm-app .r-step {
  font-size: 13px;
  color: var(--r-muted);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--r-line);
}
.rhythm-app .r-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}
.rhythm-app .r-day {
  min-height: 72px;
  text-align: left;
  padding: 10px;
  border-radius: 8px;
  display: grid;
  gap: 4px;
}
.rhythm-app .r-day small {
  font-size: 10px;
  color: inherit;
}
.rhythm-app .r-day.is-light {
  background: #e7ecd9;
}
.rhythm-app .r-day.is-rest {
  background: #eeeae1;
}
.rhythm-app .r-selected {
  margin-top: 24px;
}
.rhythm-app details {
  border-top: 1px solid var(--r-line);
  padding: 15px 0;
  margin: 12px 0;
}
.rhythm-app summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 35px;
}
.rhythm-app .r-status {
  margin: 12px 0;
  min-height: 22px;
  font-size: 14px;
}
.rhythm-app .r-status.error {
  color: #8d342b;
}
.rhythm-app .r-meter {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 112px;
  margin: 20px 0;
}
.rhythm-app .r-meter-col {
  flex: 1;
  background: #64795a;
  min-width: 8px;
  border-radius: 4px 4px 0 0;
}
.rhythm-app .r-meter-col[data-value="0"] {
  height: 2px;
}
.rhythm-app .r-meter-col[data-value="1"] {
  height: 10%;
}
.rhythm-app .r-meter-col[data-value="2"] {
  height: 20%;
}
.rhythm-app .r-meter-col[data-value="3"] {
  height: 30%;
}
.rhythm-app .r-meter-col[data-value="4"] {
  height: 40%;
}
.rhythm-app .r-meter-col[data-value="5"] {
  height: 50%;
}
.rhythm-app .r-meter-col[data-value="6"] {
  height: 60%;
}
.rhythm-app .r-meter-col[data-value="7"] {
  height: 70%;
}
.rhythm-app .r-meter-col[data-value="8"] {
  height: 80%;
}
.rhythm-app .r-meter-col[data-value="9"] {
  height: 90%;
}
.rhythm-app .r-meter-col[data-value="10"] {
  height: 100%;
}
.rhythm-app table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.rhythm-app td,
.rhythm-app th {
  text-align: left;
  padding: 10px 4px;
  border-bottom: 1px solid var(--r-line);
}
.rhythm-app .r-checklist {
  list-style: none;
  padding: 0;
}
.rhythm-app .r-checklist label {
  display: flex;
  gap: 12px;
}
.rhythm-app .r-checklist input {
  width: 18px;
  min-height: 18px;
}
.rhythm-app .r-brand {
  width: 70px;
  height: auto;
  opacity: 0.65;
}
.rhythm-mount {
  padding: 42px clamp(16px, 5vw, 72px) 60px;
  border-bottom: 1px solid #d1d9cc;
}
.rhythm-demo {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px clamp(16px, 5vw, 72px) 80px;
}
.rhythm-demo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0 32px;
}
.rhythm-demo-header img {
  width: 130px;
  height: auto;
}
.rhythm-demo-note {
  background: #e5eadc;
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 14px;
}
.rhythm-story {
  padding: 70px var(--gutter, 6vw);
  background: #e4ebdc;
}
.rhythm-story h2 {
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(36px, 5vw, 70px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.04em;
  max-width: 16ch;
}
.rhythm-story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  margin: 36px 0;
}
.rhythm-story-grid h3 {
  font-family: Fraunces, Georgia, serif;
  font-size: 30px;
  font-weight: 500;
}
.rhythm-story-grid p {
  line-height: 1.6;
  max-width: 38ch;
}
.rhythm-story a {
  color: #25362b;
}
.rhythm-app [hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  .rhythm-app .r-grid,
  .rhythm-app .r-fields,
  .rhythm-story-grid {
    grid-template-columns: 1fr;
  }
  .rhythm-app .r-card {
    padding: 20px;
  }
  .rhythm-app .r-top {
    align-items: start;
    flex-direction: column;
  }
  .rhythm-app .r-event {
    grid-template-columns: 46px minmax(0, 1fr);
  }
  .rhythm-app .r-event > button {
    grid-column: 2;
    justify-self: start;
  }
  .rhythm-app .r-tabs {
    gap: 4px;
  }
  .rhythm-app .r-tabs button {
    font-size: 13px;
    padding: 8px 12px;
  }
  .rhythm-app .r-days {
    gap: 3px;
  }
  .rhythm-app .r-day {
    padding: 7px 4px;
    min-height: 62px;
  }
  .rhythm-app .r-day small {
    font-size: 9px;
  }
  .rhythm-mount {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.rhythm-app pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
}

.rhythm-app .r-weekday {
  text-align: center;
  font-size: 0.75rem;
  color: #53624f;
  padding-block: 0.4rem;
}
